Index: Source/core/testing/Internals.cpp |
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp |
index 60a01a4e2f0013f89047e12ae3a2f6c53e14426c..97c67e97f9681154bdc4bcdccef101d4a03609bd 100644 |
--- a/Source/core/testing/Internals.cpp |
+++ b/Source/core/testing/Internals.cpp |
@@ -2314,7 +2314,7 @@ void Internals::setValueForUser(Element* element, const String& value) |
String Internals::textSurroundingNode(Node* node, int x, int y, unsigned long maxLength) |
{ |
- if (!node) |
+ if (!node || !node->layoutObject()) |
return String(); |
blink::WebPoint point(x, y); |
SurroundingText surroundingText(VisiblePosition(node->layoutObject()->positionForPoint(static_cast<IntPoint>(point))).deepEquivalent().parentAnchoredEquivalent(), maxLength); |