Module: wine Branch: master Commit: c1b411e32180cbd0b0a8c807ca78180dc78c8e9f URL: http://source.winehq.org/git/wine.git/?a=commit;h=c1b411e32180cbd0b0a8c807ca...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Mar 12 11:52:51 2009 +0100
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.
---
dlls/setupapi/fakedll.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/setupapi/fakedll.c b/dlls/setupapi/fakedll.c index 68166b7..e6eddf1 100644 --- a/dlls/setupapi/fakedll.c +++ b/dlls/setupapi/fakedll.c @@ -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 );