From: chenzhengyong <chenzhengyong(a)uniontech.com> Signed-off-by: chenzhengyong <chenzhengyong(a)uniontech.com> --- dlls/imm32/imm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c index 1d5b8cd8fa3..38ec0facff9 100644 --- a/dlls/imm32/imm.c +++ b/dlls/imm32/imm.c @@ -3073,13 +3073,18 @@ BOOL WINAPI ImmGenerateMessage( HIMC himc ) while (ctx->dwNumMsgBuf--) { TRANSMSG *msgs, msg; - if (!(msgs = ImmLockIMCC( ctx->hMsgBuf ))) return FALSE; + if (!(msgs = ImmLockIMCC( ctx->hMsgBuf ))) + { + ImmUnlockIMC( himc); + return FALSE; + } msg = msgs[0]; memmove( msgs, msgs + 1, ctx->dwNumMsgBuf * sizeof(*msgs) ); ImmUnlockIMCC( ctx->hMsgBuf ); SendMessageW( ctx->hWnd, msg.message, msg.wParam, msg.lParam ); } ctx->dwNumMsgBuf++; + ImmUnlockIMC( himc); return TRUE; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9074