[COMCTL32][USER32] Edit: Don't unlock if unlocked on EM_SETHANDLE (#7886)

JIRA issue: CORE-18944
EDIT_EM_GetHandle unlocks the handle,
so the next EM_SETHANDLE handler
shouldn't unlock the unlocked text.
Don't unlock the handle when es->text
was NULL on EM_SETHANDLE
message handling.
This commit is contained in:
Katayama Hirofumi MZ
2025-04-24 19:21:22 +09:00
committed by GitHub
parent 860262952d
commit 94fc56c038
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -2715,6 +2715,9 @@ static void EDIT_EM_SetHandle(EDITSTATE *es, HLOCAL hloc)
if (!hloc)
return;
#ifdef __REACTOS__
if (es->text)
#endif
EDIT_UnlockBuffer(es, TRUE);
es->hloc32W = hloc;
+3
View File
@@ -2898,6 +2898,9 @@ static void EDIT_EM_SetHandle(EDITSTATE *es, HLOCAL hloc)
return;
}
#ifdef __REACTOS__
if (es->text)
#endif
EDIT_UnlockBuffer(es, TRUE);
if(es->is_unicode)