| Index: ui/display/chromeos/x11/native_display_delegate_x11.cc
|
| diff --git a/ui/display/chromeos/x11/native_display_delegate_x11.cc b/ui/display/chromeos/x11/native_display_delegate_x11.cc
|
| index 2dc16a638c5017b7533bab5be694a4ee0415f615..f0d7f01f3de586559576e33f2a390b3e3ae6d908 100644
|
| --- a/ui/display/chromeos/x11/native_display_delegate_x11.cc
|
| +++ b/ui/display/chromeos/x11/native_display_delegate_x11.cc
|
| @@ -109,7 +109,8 @@ NativeDisplayDelegateX11::NativeDisplayDelegateX11()
|
| background_color_argb_(0) {}
|
|
|
| NativeDisplayDelegateX11::~NativeDisplayDelegateX11() {
|
| - if (ui::PlatformEventSource::GetInstance()) {
|
| + if (ui::PlatformEventSource::GetInstance() &&
|
| + platform_event_dispatcher_.get()) {
|
| ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(
|
| platform_event_dispatcher_.get());
|
| }
|
|
|