Fix a merge error in r149007 (was missing a null check added in r148777).
[WebKit-https.git] / Source / WebCore / rendering / LogicalSelectionOffsetCaches.h
index 5281777b4cd3462fa4f7b2da0bb3b8120aea9cdd..3c59fb67617f81bfcbb700e91626dde5ebf8fd50 100644 (file)
@@ -54,17 +54,17 @@ static inline RenderObject* containingBlockForAbsolutePosition(RenderObject* par
     RenderObject* object = parent;
     while (object && !isContainingBlockCandidateForAbsolutelyPositionedObject(object))
         object = object->parent();
-    
+
     // For a relatively positioned inline, return its nearest non-anonymous containing block,
     // not the inline itself, to avoid having a positioned objects list in all RenderInlines
     // and use RenderBlock* as RenderObject::containingBlock's return type.
     // Use RenderBlock::container() to obtain the inline.
-    if (object->isRenderInline())
+    if (object && object->isRenderInline())
         object = object->containingBlock();
-    
+
     while (object && object->isAnonymousBlock())
         object = object->containingBlock();
-    
+
     return object;
 }