mirror of
https://github.com/reactos/reactos.git
synced 2026-06-09 17:33:50 +08:00
[WIN32K:NTUSER] Correctly delete menus in failure cases in MENU_GetSystemMenu. CORE-12180
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user