Commit 1395b11d authored by David Bokan's avatar David Bokan Committed by Commit Bot

Fix null-ptr crash in fallback cursor

This crash happens because the hit test returns a null node. In that
case it's safe to just return without doing anything. Not sure how to
set this case up in a test though.

Bug: 982360
Change-Id: I20d32e2704543ee816ac17c31a51957b30366309
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1706355
Commit-Queue: David Bokan <bokan@chromium.org>
Commit-Queue: Michael Thiessen <mthiesse@chromium.org>
Auto-Submit: David Bokan <bokan@chromium.org>
Reviewed-by: default avatarMichael Thiessen <mthiesse@chromium.org>
Cr-Commit-Position: refs/heads/master@{#678296}
parent e220e535
......@@ -392,6 +392,8 @@ void FallbackCursorEventManager::HandleMousePressEvent(const WebMouseEvent& e) {
HitTestResult hit_test_result =
HitTest(root_frame_->GetDocument()->GetLayoutView(), location);
Node* node = hit_test_result.InnerNode();
if (!node)
return;
// Click on input boxes or media node should hide the cursor.
if (HasEditableStyle(*node) || node->IsMediaElement()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment