From: Joachim Henze Date: Wed, 20 Dec 2017 16:38:36 +0000 (+0100) Subject: [WIN32K] avoid BSOD in Bochs 2.6.8 CORE-13629, patch by Mark Jansen X-Git-Tag: 0.4.9-dev~606 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=82caf5f82346013299337ce47303daf915128a42;hp=9317220c0032ef62f07af6b6fbc671cab1133f5a [WIN32K] avoid BSOD in Bochs 2.6.8 CORE-13629, patch by Mark Jansen We applied this patch also last second in 0.4.7rls, now in master. IntTrackPopupMenuEx() caused the BSOD when called while window is in the process of being destroyed. --- diff --git a/win32ss/user/ntuser/menu.c b/win32ss/user/ntuser/menu.c index dbb2fff625a..965a72b81d9 100644 --- a/win32ss/user/ntuser/menu.c +++ b/win32ss/user/ntuser/menu.c @@ -4392,7 +4392,10 @@ BOOL WINAPI IntTrackPopupMenuEx( PMENU menu, UINT wFlags, int x, int y, { PWND pwndM = ValidateHwndNoErr( menu->hWnd ); if (pwndM) // wine hack around this with their destroy function. - co_UserDestroyWindow( pwndM ); // Fix wrong error return. + { + if (!(pWnd->state & WNDS_DESTROYED)) + co_UserDestroyWindow( pwndM ); // Fix wrong error return. + } menu->hWnd = 0; if (!(wFlags & TPM_NONOTIFY))