[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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

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;

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)