Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(858)

Unified Diff: third_party/WebKit/Source/core/input/PointerEventManager.cpp

Issue 2485383004: Add a null check for token creation to avoid crash (Closed)
Patch Set: Add the emptiness check Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/input/PointerEventManager.cpp
diff --git a/third_party/WebKit/Source/core/input/PointerEventManager.cpp b/third_party/WebKit/Source/core/input/PointerEventManager.cpp
index aa42f46837b4e09bc0c4b25bce46f0f942d3b23f..0416bc2b3d8b17fa20f2346b63b38f183bb0350f 100644
--- a/third_party/WebKit/Source/core/input/PointerEventManager.cpp
+++ b/third_party/WebKit/Source/core/input/PointerEventManager.cpp
@@ -318,7 +318,8 @@ WebInputEventResult PointerEventManager::handleTouchEvents(
// associated with so just pick the first finger.
RefPtr<UserGestureToken> possibleGestureToken;
if (event.type() == PlatformEvent::TouchEnd &&
- !m_inCanceledStateForPointerTypeTouch) {
+ !m_inCanceledStateForPointerTypeTouch && !touchInfos.isEmpty() &&
+ touchInfos[0].targetFrame) {
possibleGestureToken =
DocumentUserGestureToken::create(touchInfos[0].targetFrame->document());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698