2011-01-07 Ryosuke Niwa <rniwa@webkit.org>
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Jan 2011 02:42:44 +0000 (02:42 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Jan 2011 02:42:44 +0000 (02:42 +0000)
        Unreviewed; Added the missing null pointer check for r75293.

        * dom/Document.cpp:
        (WebCore::Document::adoptNode):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@75307 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/dom/Document.cpp

index e772750..0385faa 100644 (file)
@@ -1,3 +1,10 @@
+2011-01-07  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Unreviewed; Added the missing null pointer check for r75293.
+
+        * dom/Document.cpp:
+        (WebCore::Document::adoptNode):
+
 2011-01-07  Stephanie Lewis  <slewis@apple.com>
 
         Reviewed by Geoff Garen.
index 53247f8..e4b1128 100644 (file)
@@ -899,7 +899,7 @@ PassRefPtr<Node> Document::adoptNode(PassRefPtr<Node> source, ExceptionCode& ec)
     default:
         if (source->hasTagName(iframeTag)) {
             HTMLIFrameElement* iframe = static_cast<HTMLIFrameElement*>(source.get());
-            if (frame()->tree()->isDescendantOf(iframe->contentFrame())) {
+            if (frame() && frame()->tree()->isDescendantOf(iframe->contentFrame())) {
                 ec = HIERARCHY_REQUEST_ERR;
                 return 0;
             }