Index: Source/core/rendering/FastTextAutosizer.cpp |
diff --git a/Source/core/rendering/FastTextAutosizer.cpp b/Source/core/rendering/FastTextAutosizer.cpp |
index 2dea427fd5d3e084551eb6a921d051a28f0eab79..a0983990ea7aba85b03aaf5f3a332dbd9a8fc8e3 100644 |
--- a/Source/core/rendering/FastTextAutosizer.cpp |
+++ b/Source/core/rendering/FastTextAutosizer.cpp |
@@ -921,8 +921,10 @@ const RenderBlock* FastTextAutosizer::deepestBlockContainingAllText(const Render |
// its text node's lowest common ancestor as isAutosizingCluster would have made them into their |
// own independent cluster. |
const RenderBlock* containingBlock = firstNode->containingBlock(); |
- ASSERT(containingBlock->isDescendantOf(root)); |
+ if (!containingBlock) |
+ return root; |
+ ASSERT(containingBlock->isDescendantOf(root)); |
return containingBlock; |
} |