diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-08-29 13:10:16 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-08-29 13:12:15 +0100 |
commit | e54da07147a3cd065100e4eac32407a5c7f46495 (patch) | |
tree | 470cddf1500d26fd7d9cc2013ceb05c00c352398 /sal | |
parent | Unused declarations (diff) | |
download | core-e54da07147a3cd065100e4eac32407a5c7f46495.tar.gz core-e54da07147a3cd065100e4eac32407a5c7f46495.zip |
allow NULL pModuleName for WNT in osl_getModuleHandle
osl_getModuleHandle under unix can have a NULL pModuleName and the underlying
GetModuleHandle on windows allows a NULL modulename as well
Change-Id: Iaf154e635e9c96cbc62d525a7552339ce132f3dc
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/w32/module.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sal/osl/w32/module.cxx b/sal/osl/w32/module.cxx index 026cf514b50f..bd680a89e979 100644 --- a/sal/osl/w32/module.cxx +++ b/sal/osl/w32/module.cxx @@ -151,7 +151,8 @@ oslModule osl_loadModuleRelativeAscii( sal_Bool SAL_CALL osl_getModuleHandle(rtl_uString *pModuleName, oslModule *pResult) { - HINSTANCE hInstance = GetModuleHandleW(reinterpret_cast<LPCWSTR>(pModuleName->buffer)); + LPCWSTR pName = pModuleName ? reinterpret_cast<LPCWSTR>(pModuleName->buffer) : NULL; + HINSTANCE hInstance = GetModuleHandleW(pName); if( hInstance ) { *pResult = (oslModule) hInstance; |