user.exe: Make sure that the thunk selector doesn't get freed.

Spotted by Fabian Maurer.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=12732
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 879ccd3357)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
This commit is contained in:
Alexandre Julliard 2022-01-20 11:07:20 +01:00 committed by Michael Stefaniuc
parent 1a508ae2bf
commit dadacb9fb8
1 changed files with 1 additions and 0 deletions

View File

@ -155,6 +155,7 @@ static WNDPROC16 alloc_win16_thunk( WNDPROC handle )
if (!(thunk_selector = GlobalAlloc16( GMEM_FIXED | GMEM_ZEROINIT,
MAX_WINPROCS16 * sizeof(WINPROC_THUNK) )))
return NULL;
FarSetOwner16( thunk_selector, 0 );
PrestoChangoSelector16( thunk_selector, thunk_selector );
thunk_array = GlobalLock16( thunk_selector );
relay = GetProcAddress16( GetModuleHandle16("user"), "__wine_call_wndproc" );