ntdll: Avoid crash on shutting down partially initialized thread.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ee65ea88ee
commit
364099f528
|
@ -3411,7 +3411,7 @@ void WINAPI LdrShutdownThread(void)
|
|||
if (wm->ldr.TlsIndex != -1) call_tls_callbacks( wm->ldr.DllBase, DLL_THREAD_DETACH );
|
||||
|
||||
RtlAcquirePebLock();
|
||||
RemoveEntryList( &NtCurrentTeb()->TlsLinks );
|
||||
if (NtCurrentTeb()->TlsLinks.Flink) RemoveEntryList( &NtCurrentTeb()->TlsLinks );
|
||||
if ((pointers = NtCurrentTeb()->ThreadLocalStoragePointer))
|
||||
{
|
||||
for (i = 0; i < tls_module_count; i++) RtlFreeHeap( GetProcessHeap(), 0, pointers[i] );
|
||||
|
|
Loading…
Reference in New Issue