summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-08-29 13:10:16 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-08-29 13:12:15 +0100
commite54da07147a3cd065100e4eac32407a5c7f46495 (patch)
tree470cddf1500d26fd7d9cc2013ceb05c00c352398 /sal
parent3ef14b0a5a8b421169cf584a5604e14eed72a3c5 (diff)
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.cxx3
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;