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.
This commit is contained in:
parent
85f8f30a65
commit
c1b411e321
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue