Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Unified Diff: ash/accelerators/accelerator_dispatcher_linux.cc

Issue 9348113: Fix two crash and potential leak&crash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert unnecessary file, updated comment Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/accelerators/accelerator_dispatcher.cc ('k') | ash/accelerators/accelerator_dispatcher_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_dispatcher_linux.cc
diff --git a/ash/accelerators/accelerator_dispatcher_linux.cc b/ash/accelerators/accelerator_dispatcher_linux.cc
index 91fa80c57212b5bb4cc79c16a5f2eeb8ec48f06b..76a57672a9dd76ac30c2922209e9ff5c5bf38d2a 100644
--- a/ash/accelerators/accelerator_dispatcher_linux.cc
+++ b/ash/accelerators/accelerator_dispatcher_linux.cc
@@ -28,6 +28,8 @@ const int kModifierMask = (ui::EF_SHIFT_DOWN |
base::MessagePumpDispatcher::DispatchStatus AcceleratorDispatcher::Dispatch(
XEvent* xev) {
+ if (!associated_window_)
+ return EVENT_QUIT;
if (!associated_window_->CanReceiveEvents())
return aura::RootWindow::GetInstance()->GetDispatcher()->Dispatch(xev);
« no previous file with comments | « ash/accelerators/accelerator_dispatcher.cc ('k') | ash/accelerators/accelerator_dispatcher_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698