Index: ui/views/widget/native_widget_aura.cc |
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc |
index ef5a49fd472652187d9bd6971ff53451b4ef5adf..03919326ad1225cac28c90a84eeb9f4f7cd24216 100644 |
--- a/ui/views/widget/native_widget_aura.cc |
+++ b/ui/views/widget/native_widget_aura.cc |
@@ -856,7 +856,10 @@ void NativeWidgetAura::OnKeyEvent(ui::KeyEvent* event) { |
// and the window may be invisible by that time. |
if (!window_->IsVisible()) |
return; |
- GetWidget()->GetInputMethod()->DispatchKeyEvent(*event); |
+ InputMethod* input_method = GetWidget()->GetInputMethod(); |
+ if (!input_method) |
+ return; |
+ input_method->DispatchKeyEvent(*event); |
sadrul
2014/09/15 14:32:29
Remove from this patch.
mfomitchev
2014/09/15 16:37:24
Ok, I will create a separate one for this. And act
|
if (switches::IsTextInputFocusManagerEnabled()) { |
FocusManager* focus_manager = GetWidget()->GetFocusManager(); |
delegate_->OnKeyEvent(event); |