https://git.reactos.org/?p=reactos.git;a=commitdiff;h=42657493ef5b1dd7e7718…
commit 42657493ef5b1dd7e7718ecf5f3c84606e5d8e9f
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Fri Oct 15 22:30:04 2021 -0400
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Fri Oct 29 22:06:46 2021 -0400
[WIN32K] Fix uninitialized hNewMenu use in MENU_DoNextMenu.
See also: Wine's implementation.
Powered by clang-cl.
---
win32ss/user/ntuser/menu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/win32ss/user/ntuser/menu.c b/win32ss/user/ntuser/menu.c
index 3c006fcd5a6..fb169b6e472 100644
--- a/win32ss/user/ntuser/menu.c
+++ b/win32ss/user/ntuser/menu.c
@@ -3813,6 +3813,7 @@ static LRESULT FASTCALL MENU_DoNextMenu(MTRACKER* pmt, UINT Vk, UINT
wFlags)
/* switch to the system menu */
MenuTmp = get_win_sys_menu(hNewWnd);
if (MenuTmp) hNewMenu = UserHMGetHandle(MenuTmp);
+ else hNewMenu = NULL;
}
else
return FALSE;