Fix a crash if the Mozilla ActiveX control doesn't implement
DllCanUnloadNow.
diff --git a/dlls/shdocvw/shdocvw_main.c b/dlls/shdocvw/shdocvw_main.c
index 458ad9d..bfb73ea 100644
--- a/dlls/shdocvw/shdocvw_main.c
+++ b/dlls/shdocvw/shdocvw_main.c
@@ -130,17 +130,16 @@
*/
HRESULT WINAPI SHDOCVW_DllCanUnloadNow(void)
{
- HRESULT moz_can_unload = S_FALSE;
+ HRESULT moz_can_unload = S_OK;
fnCanUnloadNow pCanUnloadNow;
if (hMozCtl)
{
pCanUnloadNow = (fnCanUnloadNow)
GetProcAddress(hMozCtl, "DllCanUnloadNow");
- moz_can_unload = pCanUnloadNow();
+ if (pCanUnloadNow)
+ moz_can_unload = pCanUnloadNow();
}
- else
- moz_can_unload = S_OK;
if (moz_can_unload == S_OK && SHDOCVW_refCount == 0)
return S_OK;