Commit c1b411e3 authored by Alexandre Julliard's avatar Alexandre Julliard

setupapi: Check for NULL module to avoid an exception in RtlImageNtHeader.

This allows creating a wineprefix on 64-bit, where exception handling doesn't quite work yet.
parent 85f8f30a
......@@ -193,7 +193,7 @@ static BOOL build_fake_dll( HANDLE file, HMODULE module )
memcpy( dos + 1, fakedll_signature, sizeof(fakedll_signature) );
nt = info.nt = (IMAGE_NT_HEADERS *)(buffer + lfanew);
src_nt = RtlImageNtHeader( module );
if (module) src_nt = RtlImageNtHeader( module );
/* some fields are copied from the source dll */
#define SET(field,def) nt->field = src_nt ? src_nt->field : def
SET( FileHeader.Machine, IMAGE_FILE_MACHINE_I386 );
......
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