diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 255d5afef79..a754579bf54 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -1282,7 +1282,7 @@ static NTSTATUS fixup_imports( WINE_MODREF *wm, LPCWSTR load_path ) imp = NULL; status = STATUS_DLL_NOT_FOUND; } - else if (!is_import_dll_system( &wm->ldr, &imports[i] )) + else if (imp && !is_import_dll_system( &wm->ldr, &imports[i] )) { add_module_dependency_after( wm->ldr.DdagNode, imp->ldr.DdagNode, dep_after ); }