Commit 18d9ca87 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

ntdll: Fix modules order in InInitializationOrderModuleList.

parent b741180b
......@@ -1166,6 +1166,10 @@ static NTSTATUS process_attach( WINE_MODREF *wm, LPVOID lpReserved )
if ((status = process_attach( wm->deps[i], lpReserved )) != STATUS_SUCCESS) break;
}
if (!wm->ldr.InInitializationOrderModuleList.Flink)
InsertTailList(&NtCurrentTeb()->Peb->LdrData->InInitializationOrderModuleList,
&wm->ldr.InInitializationOrderModuleList);
/* Call DLL entry point */
if (status == STATUS_SUCCESS)
{
......@@ -1184,10 +1188,6 @@ static NTSTATUS process_attach( WINE_MODREF *wm, LPVOID lpReserved )
current_modref = prev;
}
if (!wm->ldr.InInitializationOrderModuleList.Flink)
InsertTailList(&NtCurrentTeb()->Peb->LdrData->InInitializationOrderModuleList,
&wm->ldr.InInitializationOrderModuleList);
if (wm->ldr.ActivationContext) RtlDeactivateActivationContext( 0, cookie );
/* Remove recursion flag */
wm->ldr.Flags &= ~LDR_LOAD_IN_PROGRESS;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment