[Libreoffice-commits] .: sal/osl
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Aug 29 05:19:55 PDT 2012
sal/osl/w32/module.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit e54da07147a3cd065100e4eac32407a5c7f46495
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Aug 29 13:10:16 2012 +0100
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
diff --git a/sal/osl/w32/module.cxx b/sal/osl/w32/module.cxx
index 026cf51..bd680a8 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;
More information about the Libreoffice-commits
mailing list