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

Unified Diff: ui/views/controls/menu/menu_runner.cc

Issue 12658003: Do not create display_change_listener for parent=NULL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 7 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_runner.cc
diff --git a/ui/views/controls/menu/menu_runner.cc b/ui/views/controls/menu/menu_runner.cc
index 9308cc92fa17948f16d0b14ee9343be64eb91497..d29e24cefd7ac4883130c6a6b8023d6732407d2c 100644
--- a/ui/views/controls/menu/menu_runner.cc
+++ b/ui/views/controls/menu/menu_runner.cc
@@ -317,7 +317,7 @@ MenuRunner::RunResult MenuRunner::RunMenuAt(Widget* parent,
// The parent of the nested menu will have created a DisplayChangeListener, so
// we avoid creating a DisplayChangeListener if nested. Drop menus are
// transient, so we don't cancel in that case.
- if ((types & (IS_NESTED | FOR_DROP)) == 0) {
+ if ((types & (IS_NESTED | FOR_DROP)) == 0 && parent) {
display_change_listener_.reset(
internal::DisplayChangeListener::Create(parent, this));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698