[WIN32K:NTUSER] Handle allocation failure in PopupMenuWndProc. CORE-14222

This commit is contained in:
Thomas Faber 2018-02-01 11:06:03 +01:00
parent a9ba7a3f9e
commit c464f4f2e3
No known key found for this signature in database
GPG key ID: 076E7C3D44720826

View file

@ -4436,6 +4436,10 @@ PopupMenuWndProc(
}
Wnd->fnid = FNID_MENU;
pPopupMenu = DesktopHeapAlloc( Wnd->head.rpdesk, sizeof(POPUPMENU) );
if (pPopupMenu == NULL)
{
return TRUE;
}
pPopupMenu->posSelectedItem = NO_SELECTED_ITEM;
pPopupMenu->spwndPopupMenu = Wnd;
((PMENUWND)Wnd)->ppopupmenu = pPopupMenu;