Index: ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc |
diff --git a/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc b/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc |
index 503155a7c4396e7fb6801b0c4131a3cfd638b25a..11dd2d71fa5d5583b6e407b83d86bd2fe2f8b7bc 100644 |
--- a/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc |
+++ b/ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc |
@@ -209,6 +209,8 @@ void GestureInterpreterLibevdevCros::OnGestureMove(const Gesture* gesture, |
void GestureInterpreterLibevdevCros::OnGestureScroll( |
const Gesture* gesture, |
const GestureScroll* scroll) { |
+ if (!cursor_) |
+ return; // No cursor! |
DVLOG(3) << base::StringPrintf("Gesture Scroll: (%f, %f) [%f, %f]", |
scroll->dx, |
scroll->dy, |
@@ -255,6 +257,8 @@ void GestureInterpreterLibevdevCros::Dispatch(Event* event) { |
void GestureInterpreterLibevdevCros::DispatchMouseButton(unsigned int modifier, |
bool down) { |
+ if (!cursor_) |
+ return; // No cursor! |
const gfx::PointF& loc = cursor_->location(); |
int flag = modifiers_->GetEventFlagFromModifier(modifier); |
EventType type = (down ? ET_MOUSE_PRESSED : ET_MOUSE_RELEASED); |