https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ef016bfe0a9dc3cc79246…
commit ef016bfe0a9dc3cc7924671277b44884e39d89d5
Author: Joachim Henze <Joachim.Henze(a)reactos.org>
AuthorDate: Fri Sep 21 03:04:31 2018 +0200
Commit: Joachim Henze <Joachim.Henze(a)reactos.org>
CommitDate: Fri Sep 21 03:04:31 2018 +0200
[WIN32K:NTUSER] Fix WIN32K BSOD mentioned in CORE-15027
Fixes accessing nullptr / invalid handle in Window->SystemMenu
I could trigger this occasionally when moving Opera 12.18 window
in front of Spotify 1.0.29.92 window.
Fix was:
authored by Thomas Faber (Thank you!)
tested by me
reviewed by James Tabor
---
win32ss/user/ntuser/menu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/win32ss/user/ntuser/menu.c b/win32ss/user/ntuser/menu.c
index 1e29d1d178..48d9dcc169 100644
--- a/win32ss/user/ntuser/menu.c
+++ b/win32ss/user/ntuser/menu.c
@@ -5181,7 +5181,7 @@ IntGetSystemMenu(PWND Window, BOOL bRevert)
else
{
Menu = Window->SystemMenu ? UserGetMenuObject(Window->SystemMenu) : NULL;
- if ((!Window->SystemMenu || Menu->fFlags & MNF_SYSDESKMN) &&
Window->style & WS_SYSMENU)
+ if ((!Menu || Menu->fFlags & MNF_SYSDESKMN) && Window->style
& WS_SYSMENU)
{
Menu = MENU_GetSystemMenu(Window, NULL);
Window->SystemMenu = Menu ? UserHMGetHandle(Menu) : NULL;