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

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

Issue 14267007: views: Fix crash in NativeMenuWin::AddMenuItemAt(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« 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/native_menu_win.cc
diff --git a/ui/views/controls/menu/native_menu_win.cc b/ui/views/controls/menu/native_menu_win.cc
index a61c9dea33c8330aba4a8aa3cd00521891a96564..1ca5906bd3b08dfaa5fdfce3307bdcacd902349d 100644
--- a/ui/views/controls/menu/native_menu_win.cc
+++ b/ui/views/controls/menu/native_menu_win.cc
@@ -627,7 +627,8 @@ void NativeMenuWin::AddMenuItemAt(int menu_index, int model_index) {
ui::MenuModel::ItemType type = model_->GetTypeAt(model_index);
if (type == ui::MenuModel::TYPE_SUBMENU) {
item_data->submenu.reset(
- new NativeMenuWin(model_->GetSubmenuModelAt(model_index), NULL));
+ new NativeMenuWin(model_->GetSubmenuModelAt(model_index),
+ system_menu_for_));
mii.fMask |= MIIM_SUBMENU;
mii.hSubMenu = item_data->submenu->GetNativeMenu();
GetNativeMenuWinFromHMENU(mii.hSubMenu)->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