Fix potential null-dereference.
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Nov 2007 00:28:24 +0000 (00:28 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Nov 2007 00:28:24 +0000 (00:28 +0000)
        Reviewed by Adam Roben.

        * page/FrameTree.cpp:
        (WebCore::FrameTree::isDescendantOf):

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

WebCore/ChangeLog
WebCore/page/FrameTree.cpp

index 82e3728f0964bafc03517a46271eca0f9ed7f6ed..d7d7529e1c21f81bf2a4266698ba728015ceabb7 100644 (file)
@@ -1,3 +1,12 @@
+2007-11-26  Sam Weinig  <sam@webkit.org>
+
+        Fix potential null-dereference.
+
+        Reviewed by Adam Roben.
+
+        * page/FrameTree.cpp:
+        (WebCore::FrameTree::isDescendantOf):
+
 2007-11-26  Sam Weinig  <sam@webkit.org>
 
         Reviewed by Darin.
index cb8a6a18129b87deb4b288b6ff66b660eea921b0..b50d20495f69beb7bf63fb1b1db3aedf9d6c20bc 100644 (file)
@@ -200,6 +200,9 @@ Frame* FrameTree::find(const AtomicString& name) const
 
 bool FrameTree::isDescendantOf(const Frame* ancestor) const
 {
+    if (!ancestor)
+        return false;
+
     if (m_thisFrame->page() != ancestor->page())
         return false;