Alexandre Julliard : user32: Make sure the submenu is valid in MENU_HideSubPopups.

Alexandre Julliard julliard at winehq.org
Mon Jan 26 10:14:18 CST 2009


Module: wine
Branch: master
Commit: 7d657ed8f44c12b58c88ecd97471ecde245ae0c6
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7d657ed8f44c12b58c88ecd97471ecde245ae0c6

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Jan 26 15:09:07 2009 +0100

user32: Make sure the submenu is valid in MENU_HideSubPopups.

---

 dlls/user32/menu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c
index 05596af..efb14c6 100644
--- a/dlls/user32/menu.c
+++ b/dlls/user32/menu.c
@@ -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 );




More information about the wine-cvs mailing list