Index: ui/platform_window/x11/x11_window.cc |
diff --git a/ui/platform_window/x11/x11_window.cc b/ui/platform_window/x11/x11_window.cc |
index 3c4ee2a6e4b2dd6c489d1d64591f33d25a8c0ca5..64bd7a8f1ae3a566a5e1d5c89299915026ff8d7b 100644 |
--- a/ui/platform_window/x11/x11_window.cc |
+++ b/ui/platform_window/x11/x11_window.cc |
@@ -24,6 +24,10 @@ X11Window::X11Window(PlatformWindowDelegate* delegate, const gfx::Rect& bounds) |
} |
X11Window::~X11Window() { |
+ X11Window::PrepareForShutdown(); |
+} |
+ |
+void X11Window::PrepareForShutdown() { |
PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this); |
} |