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

Unified Diff: components/mus/event_dispatcher.cc

Issue 1362793002: Construct and check for mojo::Event's LocationData as needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also audit wheel_data and brush_data. Created 5 years, 3 months 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
Index: components/mus/event_dispatcher.cc
diff --git a/components/mus/event_dispatcher.cc b/components/mus/event_dispatcher.cc
index c505f2f668bdbf7c03dd39dc5b76e0a3b350ebdd..548fc41429128788b874dd51584cee79117b3ccd 100644
--- a/components/mus/event_dispatcher.cc
+++ b/components/mus/event_dispatcher.cc
@@ -71,7 +71,7 @@ bool EventDispatcher::FindAccelerator(const mojo::Event& event,
ServerView* EventDispatcher::FindEventTarget(mojo::Event* event) {
ServerView* focused_view = view_tree_host_->GetFocusedView();
- if (event->pointer_data) {
+ if (event->pointer_data && event->pointer_data->location) {
ServerView* root = view_tree_host_->root_view();
const gfx::Point root_point(
static_cast<int>(event->pointer_data->location->x),

Powered by Google App Engine
This is Rietveld 408576698