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

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

Issue 2684993009: Stop MenuItemView From Directly Caching MenuController (Closed)
Patch Set: Created 3 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 | « ui/views/controls/menu/menu_item_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/submenu_view.cc
diff --git a/ui/views/controls/menu/submenu_view.cc b/ui/views/controls/menu/submenu_view.cc
index 88431caaffb36afc167830d9bf9a4cf56f53950d..1f9abd424f51b660ece4e06de6f6fcb3cfc681f0 100644
--- a/ui/views/controls/menu/submenu_view.cc
+++ b/ui/views/controls/menu/submenu_view.cc
@@ -454,7 +454,9 @@ MenuScrollViewContainer* SubmenuView::GetScrollViewContainer() {
void SubmenuView::MenuHostDestroyed() {
host_ = NULL;
- GetMenuItem()->GetMenuController()->Cancel(MenuController::EXIT_DESTROYED);
+ MenuController* controller = GetMenuItem()->GetMenuController();
+ if (controller)
+ controller->Cancel(MenuController::EXIT_DESTROYED);
}
const char* SubmenuView::GetClassName() const {
« no previous file with comments | « ui/views/controls/menu/menu_item_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698