https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d992c07239de9ab645f9d77986075abd8069d51d
commit d992c07239de9ab645f9d77986075abd8069d51d Author: Katayama Hirofumi MZ <[email protected]> AuthorDate: Mon Jan 23 12:22:54 2023 +0900 Commit: GitHub <[email protected]> CommitDate: Mon Jan 23 12:22:54 2023 +0900 [NTUSER] Check IME-like after WNDS_DESTROYED check (#5005) The guilty commit a2c6af0 enabled the IMM mode. So we have to take care of the default IME windows. Using IS_WND_IMELIKE against WNDS_DESTROYED window was the cause of BSoD. CORE-18777 --- win32ss/user/ntuser/window.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/win32ss/user/ntuser/window.c b/win32ss/user/ntuser/window.c index 2bdc64f6be9..142815a6884 100644 --- a/win32ss/user/ntuser/window.c +++ b/win32ss/user/ntuser/window.c @@ -2953,7 +2953,7 @@ BOOLEAN co_UserDestroyWindow(PVOID Object) * Check if this window is the Shell's Desktop Window. If so set hShellWindow to NULL */ - if ((ti != NULL) && (ti->pDeskInfo != NULL)) + if (ti->pDeskInfo != NULL) { if (ti->pDeskInfo->hShellWindow == hWnd) { @@ -2987,9 +2987,10 @@ BOOLEAN co_UserDestroyWindow(PVOID Object) /* Send destroy messages */ IntSendDestroyMsg(UserHMGetHandle(Window)); - // Destroy the default IME window if necessary + /* Destroy the default IME window if necessary */ if (IS_IMM_MODE() && !(ti->TIF_flags & TIF_INCLEANUP) && - ti->spwndDefaultIme && !IS_WND_IMELIKE(Window) && !(Window->state & WNDS_DESTROYED)) + ti->spwndDefaultIme && (ti->spwndDefaultIme != Window) && + !(Window->state & WNDS_DESTROYED) && !IS_WND_IMELIKE(Window)) { if (IS_WND_CHILD(Window)) {
