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

Unified Diff: views/controls/menu/menu_controller.cc

Issue 6275009: Fixes possible crash in menus. The crash would happen because we were (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: Created 9 years, 11 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: views/controls/menu/menu_controller.cc
diff --git a/views/controls/menu/menu_controller.cc b/views/controls/menu/menu_controller.cc
index 543e48cfaf5a4b4c58b8b9edc33a7e0f3a0c2588..83b5bdcadc1324434f0dd55eacb718f8650e2019 100644
--- a/views/controls/menu/menu_controller.cc
+++ b/views/controls/menu/menu_controller.cc
@@ -559,6 +559,7 @@ void MenuController::OnMouseMoved(SubmenuView* source,
if (part.type == MenuPart::MENU_ITEM && part.menu) {
SetSelection(part.menu, SELECTION_OPEN_SUBMENU);
} else if (!part.is_scroll() && pending_state_.item &&
+ pending_state_.item->GetParentMenuItem() &&
(!pending_state_.item->HasSubmenu() ||
!pending_state_.item->GetSubmenu()->IsShowing())) {
// On exit if the user hasn't selected an item with a submenu, move the
« 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