mirror of
https://github.com/reactos/reactos.git
synced 2024-07-01 02:10:07 +00:00
[WIN32K:NTUSER] Handle IntCloneMenu failure in MENU_GetSystemMenu. CORE-12180
This commit is contained in:
parent
ede8794c4b
commit
89217e3df5
|
@ -5120,6 +5120,12 @@ PMENU FASTCALL MENU_GetSystemMenu(PWND Window, PMENU Popup)
|
||||||
IntMenuItemInfo(Menu, SC_MINIMIZE, FALSE, &ItemInfoSet, TRUE, NULL);
|
IntMenuItemInfo(Menu, SC_MINIMIZE, FALSE, &ItemInfoSet, TRUE, NULL);
|
||||||
|
|
||||||
NewMenu = IntCloneMenu(Menu);
|
NewMenu = IntCloneMenu(Menu);
|
||||||
|
if (NewMenu == NULL)
|
||||||
|
{
|
||||||
|
IntDestroyMenuObject(Menu, FALSE);
|
||||||
|
IntDestroyMenuObject(SysMenu, FALSE);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
IntReleaseMenuObject(NewMenu);
|
IntReleaseMenuObject(NewMenu);
|
||||||
UserSetMenuDefaultItem(NewMenu, SC_CLOSE, FALSE);
|
UserSetMenuDefaultItem(NewMenu, SC_CLOSE, FALSE);
|
||||||
|
|
Loading…
Reference in a new issue