Add a missing nullity check in RenderObject::containingBlock
authorvollick@chromium.org <vollick@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Dec 2012 23:52:35 +0000 (23:52 +0000)
committervollick@chromium.org <vollick@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Dec 2012 23:52:35 +0000 (23:52 +0000)
https://bugs.webkit.org/show_bug.cgi?id=104961

Reviewed by Adrienne Walker.

Adds a missing nullity check in an assert.

No new tests, no change in functionality.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::containingBlock):

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

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

index c62492f..94875d6 100644 (file)
@@ -1,3 +1,17 @@
+2012-12-13  Ian Vollick  <vollick@chromium.org>
+
+        Add a missing nullity check in RenderObject::containingBlock
+        https://bugs.webkit.org/show_bug.cgi?id=104961
+
+        Reviewed by Adrienne Walker.
+
+        Adds a missing nullity check in an assert.
+
+        No new tests, no change in functionality.
+
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::containingBlock):
+
 2012-12-13  Tab Atkins  <tabatkins@google.com>
 
         Switch the gradient drawing code to use bearing angles
index 718cdb3..ac0f67d 100644 (file)
@@ -768,7 +768,7 @@ RenderBlock* RenderObject::containingBlock() const
 #endif
             o = o->parent();
         }
-        ASSERT(!o->isAnonymousBlock());
+        ASSERT(!o || !o->isAnonymousBlock());
     } else if (!isText() && m_style->position() == AbsolutePosition) {
         while (o) {
             // For relpositioned inlines, we return the nearest non-anonymous enclosing block. We don't try