| Index: ash/mus/ash_window_tree_host_mus.cc
|
| diff --git a/ash/mus/ash_window_tree_host_mus.cc b/ash/mus/ash_window_tree_host_mus.cc
|
| index 371285523a74bad2c571043e618e09f36739f9ae..7c10818a2cb53502302e5b63d78e7964aa72d2ac 100644
|
| --- a/ash/mus/ash_window_tree_host_mus.cc
|
| +++ b/ash/mus/ash_window_tree_host_mus.cc
|
| @@ -88,9 +88,11 @@ void AshWindowTreeHostMus::UpdateRootWindowSizeInPixels(
|
|
|
| ui::EventDispatchDetails AshWindowTreeHostMus::DispatchKeyEventPostIME(
|
| ui::KeyEvent* event) {
|
| - input_method_handler()->SetPostIME(true);
|
| + // input_method_handler() can be null when using IME service with --mus.
|
| + if (input_method_handler())
|
| + input_method_handler()->SetPostIME(true);
|
| ui::EventDispatchDetails details = SendEventToSink(event);
|
| - if (!details.dispatcher_destroyed)
|
| + if (input_method_handler() && !details.dispatcher_destroyed)
|
| input_method_handler()->SetPostIME(false);
|
| return details;
|
| }
|
|
|