[Win32k]
authorJames Tabor <james.tabor@reactos.org>
Wed, 7 Sep 2016 06:33:44 +0000 (06:33 +0000)
committerJames Tabor <james.tabor@reactos.org>
Wed, 7 Sep 2016 06:33:44 +0000 (06:33 +0000)
- Fix a crash while running modified stress test with explorer. See CORE-11913.

svn path=/trunk/; revision=72605

reactos/win32ss/user/ntuser/menu.c

index 34db3d9..c468499 100644 (file)
@@ -4137,9 +4137,12 @@ static INT FASTCALL MENU_TrackMenu(PMENU pmenu, UINT wFlags, INT x, INT y,
            if (mt.TopMenu->fFlags & MNF_POPUP)
            {
               PWND pwndTM = ValidateHwndNoErr(mt.TopMenu->hWnd);
-              IntNotifyWinEvent(EVENT_SYSTEM_MENUPOPUPEND, pwndTM, OBJID_CLIENT, CHILDID_SELF, 0);
+              if (pwndTM)
+              {
+                 IntNotifyWinEvent(EVENT_SYSTEM_MENUPOPUPEND, pwndTM, OBJID_CLIENT, CHILDID_SELF, 0);
 
-              co_UserDestroyWindow(pwndTM);
+                 co_UserDestroyWindow(pwndTM);
+              }
               mt.TopMenu->hWnd = NULL;
 
               if (!(wFlags & TPM_NONOTIFY))