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

Unified Diff: chrome/test/base/view_event_test_base.cc

Issue 10154013: Fixes crash in closing menus. There are two issues here: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: OnOwnerClosing and more comments Created 8 years, 8 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: chrome/test/base/view_event_test_base.cc
diff --git a/chrome/test/base/view_event_test_base.cc b/chrome/test/base/view_event_test_base.cc
index a98b80ef3d96e5e80e599f71f6666bfd7e980fce..91be23d506802ec6594773321abc14c179d7b8e6 100644
--- a/chrome/test/base/view_event_test_base.cc
+++ b/chrome/test/base/view_event_test_base.cc
@@ -68,7 +68,8 @@ void ViewEventTestBase::Done() {
#if defined(OS_WIN) && !defined(USE_AURA)
// We need to post a message to tickle the Dispatcher getting called and
// exiting out of the nested loop. Without this the quit never runs.
- PostMessage(window_->GetNativeWindow(), WM_USER, 0, 0);
+ if (window_)
+ PostMessage(window_->GetNativeWindow(), WM_USER, 0, 0);
#endif
// If we're in a nested message loop, as is the case with menus, we

Powered by Google App Engine
This is Rietveld 408576698