https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0f1e19a7b68731e92c4e4…
commit 0f1e19a7b68731e92c4e4336fa58f5b06cb92e8f
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Sun Apr 10 17:20:21 2022 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Sun Apr 10 17:20:21 2022 +0900
[NTUSER] Simplify IntDestroyInputContext (#4443)
CORE-11700
---
win32ss/user/ntuser/ime.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/win32ss/user/ntuser/ime.c b/win32ss/user/ntuser/ime.c
index 1aa1ce49dd8..27342263904 100644
--- a/win32ss/user/ntuser/ime.c
+++ b/win32ss/user/ntuser/ime.c
@@ -1257,7 +1257,6 @@ VOID UserFreeInputContext(PVOID Object)
BOOLEAN UserDestroyInputContext(PVOID Object)
{
PIMC pIMC = Object;
-
if (!pIMC || !UserMarkObjectDestroy(pIMC))
return TRUE;
@@ -1265,17 +1264,16 @@ BOOLEAN UserDestroyInputContext(PVOID Object)
}
// Win: DestroyInputContext
-BOOLEAN IntDestroyInputContext(PVOID Object)
+BOOL IntDestroyInputContext(PIMC pIMC)
{
- PIMC pIMC = Object;
- HIMC hIMC = pIMC->head.h;
+ HIMC hIMC = UserHMGetHandle(pIMC);
PTHREADINFO pti = pIMC->head.pti;
PWND pwndChild;
PWINDOWLIST pwl;
HWND *phwnd;
PWND pWnd;
- if (pIMC->head.pti != gptiCurrent)
+ if (pti != gptiCurrent)
{
EngSetLastError(ERROR_ACCESS_DENIED);
return FALSE;