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

Unified Diff: ash/accelerators/accelerator_dispatcher_win.cc

Issue 9348113: Fix two crash and potential leak&crash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: ash/accelerators/accelerator_dispatcher_win.cc
diff --git a/ash/accelerators/accelerator_dispatcher_win.cc b/ash/accelerators/accelerator_dispatcher_win.cc
index 162d44f69dd4e1c039b27aba6b82e400b23b0746..fca6d0494c0982ea7c27e76865b715173133600d 100644
--- a/ash/accelerators/accelerator_dispatcher_win.cc
+++ b/ash/accelerators/accelerator_dispatcher_win.cc
@@ -20,6 +20,8 @@ const int kModifierMask = (ui::EF_SHIFT_DOWN |
} // namespace
bool AcceleratorDispatcher::Dispatch(const MSG& msg) {
+ if (!associated_window_)
+ return false;
if (!associated_window_->CanReceiveEvents())
return aura::RootWindow::GetInstance()->GetDispatcher()->Dispatch(msg);

Powered by Google App Engine
This is Rietveld 408576698