Chromium Code Reviews| Index: ui/wm/core/input_method_event_filter.cc |
| diff --git a/ui/wm/core/input_method_event_filter.cc b/ui/wm/core/input_method_event_filter.cc |
| index 4854a1b5f99239498fd06323cd99ff7362c9a40f..224b2704600b772081b34539d272fb8a3098fc26 100644 |
| --- a/ui/wm/core/input_method_event_filter.cc |
| +++ b/ui/wm/core/input_method_event_filter.cc |
| @@ -63,9 +63,11 @@ bool InputMethodEventFilter::DispatchKeyEventPostIME( |
| DCHECK(!event.HasNativeEvent() || event.native_event().message != WM_CHAR); |
| #endif |
| ui::TranslatedKeyEvent aura_event(event); |
| - ui::EventDispatchDetails details = |
| - target_dispatcher_->OnEventFromSource(&aura_event); |
| - CHECK(!details.dispatcher_destroyed); |
| + if (target_dispatcher_) { |
|
Seigo Nonaka
2014/05/26 04:59:29
nit: I prefer early exit like:
if (!target_dispatc
Shu Chen
2014/05/26 05:04:49
I don't think it's a good idea to have a dup code
|
| + ui::EventDispatchDetails details = |
| + target_dispatcher_->OnEventFromSource(&aura_event); |
| + CHECK(!details.dispatcher_destroyed); |
| + } |
| return aura_event.handled(); |
| } |