mirror of
https://github.com/reactos/reactos.git
synced 2024-05-23 13:52:03 +00:00
[WIN32K] Fix NULL pointer dereference in MENU_HideSubPopups
Fixes CORE-19367.
This commit is contained in:
parent
bbb3b00398
commit
0403e6e0eb
|
@ -3282,11 +3282,17 @@ static void FASTCALL MENU_HideSubPopups(PWND pWndOwner, PMENU Menu,
|
|||
{
|
||||
PWND pWnd;
|
||||
if (!VerifyMenu(Item->spSubMenu)) return;
|
||||
pWnd = ValidateHwndNoErr(Item->spSubMenu->hWnd);
|
||||
MENU_HideSubPopups(pWndOwner, Item->spSubMenu, FALSE, wFlags);
|
||||
MENU_SelectItem(pWndOwner, Item->spSubMenu, NO_SELECTED_ITEM, SendMenuSelect, NULL);
|
||||
TRACE("M_HSP top p hm %p pWndOwner IDMenu %p\n",top_popup_hmenu,pWndOwner->IDMenu);
|
||||
co_UserDestroyWindow(pWnd);
|
||||
if (Item->spSubMenu->hWnd != NULL)
|
||||
{
|
||||
pWnd = ValidateHwndNoErr(Item->spSubMenu->hWnd);
|
||||
if (pWnd != NULL)
|
||||
{
|
||||
co_UserDestroyWindow(pWnd);
|
||||
}
|
||||
}
|
||||
|
||||
/* Native returns handle to destroyed window */
|
||||
if (!(wFlags & TPM_NONOTIFY))
|
||||
|
|
Loading…
Reference in a new issue