Commit 9dacfe60 authored by mfomitchev's avatar mfomitchev Committed by Commit bot

Fixing a possible NULL pointer dereference in NativeWidgetAura.

BUG=NONE

Review URL: https://codereview.chromium.org/569283002

Cr-Commit-Position: refs/heads/master@{#294859}
parent 923f4e6a
......@@ -860,7 +860,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);
if (switches::IsTextInputFocusManagerEnabled()) {
FocusManager* focus_manager = GetWidget()->GetFocusManager();
delegate_->OnKeyEvent(event);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment