ntdll: Call TLS callbacks also for main exe on thread attach.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49007
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49098
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49041
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Paul Gofman 2020-06-24 23:30:05 +03:00 committed by Alexandre Julliard
parent 71d34fc43c
commit 1dc3383389
1 changed files with 1 additions and 0 deletions

View File

@ -3469,6 +3469,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow
if ((status = alloc_thread_tls()) != STATUS_SUCCESS)
NtTerminateThread( GetCurrentThread(), status );
thread_attach();
if (wm->ldr.TlsIndex != -1) call_tls_callbacks( wm->ldr.DllBase, DLL_THREAD_ATTACH );
}
RtlLeaveCriticalSection( &loader_section );