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

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: 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 16ad24eebe6e59db0fb912dff29a57f5c6354924..c2c4dd22d914566f7565754e5770b4b2a753804a 100644
--- a/ui/views/controls/menu/menu_runner.cc
+++ b/ui/views/controls/menu/menu_runner.cc
@@ -284,7 +284,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 != NULL) {
Ben Goodger (Google) 2013/03/11 16:10:07 nit && parent
Jun Mukai 2013/03/11 16:42:29 Done.
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