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 hverbeet@codeweavers.com --- 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 ); }