Author: jimtabor
Date: Thu May  8 12:46:01 2014
New Revision: 63186
URL: 
http://svn.reactos.org/svn/reactos?rev=63186&view=rev
Log:
[User32]
- Fixed regression from r63183. See CORE-7967.
Modified:
    trunk/reactos/win32ss/user/user32/windows/menu.c
Modified: trunk/reactos/win32ss/user/user32/windows/menu.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
==============================================================================
--- trunk/reactos/win32ss/user/user32/windows/menu.c    [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/windows/menu.c    [iso-8859-1] Thu May  8 12:46:01
2014
@@ -2945,6 +2945,8 @@
           MenuHideSubPopups(WndOwner, &SubMenuInfo, FALSE, wFlags);
           MenuSelectItem(WndOwner, &SubMenuInfo, NO_SELECTED_ITEM, SendMenuSelect,
NULL);
+          DestroyWindow(SubMenuInfo.Wnd);
+          /* Native returns handle to destroyed window */
           if (!(wFlags & TPM_NONOTIFY))
              SendMessageW( WndOwner, WM_UNINITMENUPOPUP, (WPARAM)ItemInfo.hSubMenu,
                                  MAKELPARAM(0, IS_SYSTEM_MENU(&SubMenuInfo)) );
@@ -2952,7 +2954,6 @@
           // Call WM_UNINITMENUPOPUP FIRST before destroy!!
           // Fixes todo_wine User32 test menu.c line 2233 GetMenuBarInfo callback....
           //
-          DestroyWindow(SubMenuInfo.Wnd);
           SubMenuInfo.Wnd = NULL;
           MenuSetRosMenuInfo(&SubMenuInfo);
           ////
@@ -3966,6 +3967,7 @@
                     IntNotifyWinEvent(EVENT_SYSTEM_MENUPOPUPEND, MenuInfo.Wnd,
OBJID_CLIENT, CHILDID_SELF, 0);
                     DestroyWindow(MenuInfo.Wnd);
                     MenuInfo.Wnd = NULL;
+                    MenuSetRosMenuInfo(&MenuInfo);
                     if (!(wFlags & TPM_NONOTIFY))
                       SendMessageW( mt.OwnerWnd, WM_UNINITMENUPOPUP, (WPARAM)mt.TopMenu,