mirror of
https://github.com/reactos/reactos.git
synced 2024-06-29 01:12:06 +00:00
[WIN32K:NTUSER] Correctly delete menus in failure cases in MENU_GetSystemMenu. CORE-12180
This commit is contained in:
parent
89217e3df5
commit
b7aa1e3122
|
@ -5092,15 +5092,13 @@ PMENU FASTCALL MENU_GetSystemMenu(PWND Window, PMENU Popup)
|
|||
if (!hNewMenu)
|
||||
{
|
||||
ERR("No Menu!!\n");
|
||||
IntReleaseMenuObject(SysMenu);
|
||||
UserDestroyMenu(hSysMenu);
|
||||
IntDestroyMenuObject(SysMenu, FALSE);
|
||||
return NULL;
|
||||
}
|
||||
Menu = UserGetMenuObject(hNewMenu);
|
||||
if (!Menu)
|
||||
{
|
||||
IntReleaseMenuObject(SysMenu);
|
||||
UserDestroyMenu(hSysMenu);
|
||||
IntDestroyMenuObject(SysMenu, FALSE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue