ntdll: Make sure we don't try to attach the main exe a second time.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48961
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
feature/deterministic
Alexandre Julliard 2020-04-21 11:23:15 +02:00
parent f31a29b8d1
commit 0a72ec1dac
1 changed files with 1 additions and 0 deletions

View File

@ -4009,6 +4009,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow
NtTerminateProcess( GetCurrentProcess(), status );
}
wm->ldr.LoadCount = -1;
wm->ldr.Flags |= LDR_PROCESS_ATTACHED; /* don't try to attach again */
if (wm->ldr.ActivationContext)
RtlActivateActivationContext( 0, wm->ldr.ActivationContext, &cookie );