user32: Make sure the submenu is valid in MENU_HideSubPopups.

This commit is contained in:
Alexandre Julliard 2009-01-26 15:09:07 +01:00
parent f12c5bfca3
commit 7d657ed8f4
1 changed files with 1 additions and 1 deletions

View File

@ -2298,7 +2298,7 @@ static void MENU_HideSubPopups( HWND hwndOwner, HMENU hmenu,
hsubmenu = item->hSubMenu;
} else return;
submenu = MENU_GetMenu( hsubmenu );
if (!(submenu = MENU_GetMenu( hsubmenu ))) return;
MENU_HideSubPopups( hwndOwner, hsubmenu, FALSE, wFlags );
MENU_SelectItem( hwndOwner, hsubmenu, NO_SELECTED_ITEM, sendMenuSelect, 0 );
DestroyWindow( submenu->hWnd );