Index: ash/wm/workspace/workspace_event_handler.cc |
diff --git a/ash/wm/workspace/workspace_event_handler.cc b/ash/wm/workspace/workspace_event_handler.cc |
index afd017bb0e8bacea4a2de7bffe13d8844074a046..25d9ee0aa58227db9411c27f1058e195b864b713 100644 |
--- a/ash/wm/workspace/workspace_event_handler.cc |
+++ b/ash/wm/workspace/workspace_event_handler.cc |
@@ -24,6 +24,10 @@ WorkspaceEventHandler::~WorkspaceEventHandler() { |
void WorkspaceEventHandler::OnMouseEvent(ui::MouseEvent* event) { |
aura::Window* target = static_cast<aura::Window*>(event->target()); |
+ |
+ if (!target->delegate()) |
Nina
2015/01/09 15:43:49
Without the change, this code would crash if the u
|
+ return; |
+ |
if (event->type() == ui::ET_MOUSE_PRESSED && |
event->IsOnlyLeftMouseButton() && |
((event->flags() & |
@@ -82,6 +86,10 @@ void WorkspaceEventHandler::OnGestureEvent(ui::GestureEvent* event) { |
return; |
aura::Window* target = static_cast<aura::Window*>(event->target()); |
+ |
+ if (!target->delegate()) |
+ return; |
+ |
int previous_target_component = click_component_; |
click_component_ = target->delegate()-> |
GetNonClientComponent(event->location()); |