Kaydet (Commit) e54da071 authored tarafından Caolán McNamara's avatar Caolán McNamara

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
üst 3ef14b0a
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment