From deff68bb728a58965fc69bd8a7d3759d6073b6a3 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Thu, 18 Nov 2021 18:52:20 +0100 Subject: [PATCH] ntdll: Only add a module dependency if import_dll() returned a modref. In particular, if import_dll() skips an unused import, it will return TRUE, but set *pwm to NULL. This fixes a regression in 3DMark03 version 3.4.0, introduced by commit 0dd37b02f99f5090dd855343fcd8a99496047f3e. Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/ntdll/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ); }