Commit 6f87386a authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

Fix a crash if the Mozilla ActiveX control doesn't implement

DllCanUnloadNow.
parent 23805995
...@@ -130,17 +130,16 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD fdwReason, LPVOID fImpLoad) ...@@ -130,17 +130,16 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD fdwReason, LPVOID fImpLoad)
*/ */
HRESULT WINAPI SHDOCVW_DllCanUnloadNow(void) HRESULT WINAPI SHDOCVW_DllCanUnloadNow(void)
{ {
HRESULT moz_can_unload = S_FALSE; HRESULT moz_can_unload = S_OK;
fnCanUnloadNow pCanUnloadNow; fnCanUnloadNow pCanUnloadNow;
if (hMozCtl) if (hMozCtl)
{ {
pCanUnloadNow = (fnCanUnloadNow) pCanUnloadNow = (fnCanUnloadNow)
GetProcAddress(hMozCtl, "DllCanUnloadNow"); 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) if (moz_can_unload == S_OK && SHDOCVW_refCount == 0)
return S_OK; return S_OK;
......
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