Commit fbeeb636 authored by tfarina@chromium.org's avatar tfarina@chromium.org

views: Fix crash in NativeMenuWin::AddMenuItemAt().

BUG=233243
R=msw@chromium.org
TBR=ben@chromium.org

Review URL: https://codereview.chromium.org/14267007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195033 0039d316-1c4b-4281-b951-d872f2087c98
parent 38dfd13a
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment