Author: tfaber
Date: Tue Sep 8 11:39:10 2015
New Revision: 69113
URL:
http://svn.reactos.org/svn/reactos?rev=69113&view=rev
Log:
[BROWSEUI]
- Check for NULL return from LoadLibrary
CORE-10135 #resolve
Modified:
trunk/reactos/dll/win32/browseui/precomp.h
Modified: trunk/reactos/dll/win32/browseui/precomp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/browseui/precomp…
==============================================================================
--- trunk/reactos/dll/win32/browseui/precomp.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/browseui/precomp.h [iso-8859-1] Tue Sep 8 11:39:10 2015
@@ -65,12 +65,15 @@
if (!hRShell)
hRShell = LoadLibrary(L"rshell.dll");
- PMERGEDFOLDER_CONSTRUCTOR pCMergedFolder_Constructor = (PMERGEDFOLDER_CONSTRUCTOR)
- GetProcAddress(hRShell, "CMergedFolder_Constructor");
+ if (hRShell)
+ {
+ PMERGEDFOLDER_CONSTRUCTOR pCMergedFolder_Constructor =
(PMERGEDFOLDER_CONSTRUCTOR)
+ GetProcAddress(hRShell, "CMergedFolder_Constructor");
- if (pCMergedFolder_Constructor)
- {
- return pCMergedFolder_Constructor(riid, ppv);
+ if (pCMergedFolder_Constructor)
+ {
+ return pCMergedFolder_Constructor(riid, ppv);
+ }
}
#endif
return CoCreateInstance(CLSID_MergedFolder, NULL, CLSCTX_INPROC_SERVER, riid, ppv);
@@ -85,10 +88,13 @@
if (!hRShell)
hRShell = LoadLibraryW(L"rshell.dll");
- PMENUBAND_CONSTRUCTOR func = (PMENUBAND_CONSTRUCTOR) GetProcAddress(hRShell,
"CMenuBand_Constructor");
- if (func)
+ if (hRShell)
{
- return func(iid , ppv);
+ PMENUBAND_CONSTRUCTOR func = (PMENUBAND_CONSTRUCTOR) GetProcAddress(hRShell,
"CMenuBand_Constructor");
+ if (func)
+ {
+ return func(iid , ppv);
+ }
}
#endif
return CoCreateInstance(CLSID_MenuBand, NULL, CLSCTX_INPROC_SERVER, iid, ppv);