Index: Source/core/frame/LocalFrame.cpp |
diff --git a/Source/core/frame/LocalFrame.cpp b/Source/core/frame/LocalFrame.cpp |
index 71d68ddad4e82ebdc13dfc2fbf6ff8e1931d4d11..d1df87501934f303013b14f2afb593bf16f314b9 100644 |
--- a/Source/core/frame/LocalFrame.cpp |
+++ b/Source/core/frame/LocalFrame.cpp |
@@ -668,10 +668,10 @@ Document* LocalFrame::documentAtPoint(const IntPoint& pointInRootFrame) |
return nullptr; |
IntPoint pt = view()->rootFrameToContents(pointInRootFrame); |
- HitTestResult result = HitTestResult(pt); |
- if (contentRenderer()) |
- result = eventHandler().hitTestResultAtPoint(pt, HitTestRequest::ReadOnly | HitTestRequest::Active); |
+ if (!contentRenderer()) |
+ return nullptr; |
+ HitTestResult result = eventHandler().hitTestResultAtPoint(pt, HitTestRequest::ReadOnly | HitTestRequest::Active); |
return result.innerNode() ? &result.innerNode()->document() : nullptr; |
} |