Add a missing null pointer check after r148759.
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Apr 2013 22:47:59 +0000 (22:47 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Apr 2013 22:47:59 +0000 (22:47 +0000)
* rendering/RenderObject.cpp:
(WebCore::RenderObject::containingBlock):

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

Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderObject.cpp

index 14366e905cf95f73ccb3830bb85cbefc3ee79aa1..beba219d39a05718515853469433fc8a517039bc 100644 (file)
@@ -1,3 +1,10 @@
+2013-04-19  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Add a missing null pointer check after r148759.
+
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::containingBlock):
+
 2013-04-19  Benjamin Poulain  <benjamin@webkit.org>
 
         Use Vector instead of StringBuilder for CSSPreloadScanner's buffers
 2013-04-19  Benjamin Poulain  <benjamin@webkit.org>
 
         Use Vector instead of StringBuilder for CSSPreloadScanner's buffers
index 95fb75cd6fdeae7a103212b5e55b2ade1e05f024..9aad14e1bbaa2587f196e7908395dab484ae9237 100644 (file)
@@ -801,7 +801,7 @@ RenderBlock* RenderObject::containingBlock() const
         // not the inline itself, to avoid having a positioned objects list in all RenderInlines
         // and use RenderBlock* as this function's return type.
         // Use RenderBlock::container() to obtain the inline.
         // not the inline itself, to avoid having a positioned objects list in all RenderInlines
         // and use RenderBlock* as this function's return type.
         // Use RenderBlock::container() to obtain the inline.
-        if (o->isRenderInline())
+        if (o && o->isRenderInline())
             o = o->containingBlock();
 
         while (o && o->isAnonymousBlock())
             o = o->containingBlock();
 
         while (o && o->isAnonymousBlock())