Fixes https://bugs.winehq.org/show_bug.cgi?id=28861 If a context does not exist in the local storage already, it is automatically generated and returned to the application. If the handle is not owned by the process however, 'ImmGetContext()' should return 'NULL'. Thanks to: Mike Tedder Signed-off-by: Jimi Huotari <chiitoo(a)gentoo.org> --- dlls/imm32/imm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c index 685eb018c4..46bf5b45c8 100644 --- a/dlls/imm32/imm.c +++ b/dlls/imm32/imm.c @@ -1509,7 +1509,7 @@ HIMC WINAPI ImmGetContext(HWND hWnd) rc = GetPropW(hWnd,szwWineIMCProperty); if (rc == (HIMC)-1) rc = NULL; - else if (rc == NULL) + else if (rc == NULL && IMM_IsCrossThreadAccess(hWnd, rc)) rc = get_default_context( hWnd ); if (rc) -- 2.17.0