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

DllCanUnloadNow.
This commit is contained in:
Juan Lang 2005-03-10 17:25:23 +00:00 committed by Alexandre Julliard
parent 23805995a6
commit 6f87386a98
1 changed files with 3 additions and 4 deletions

View File

@ -130,17 +130,16 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD fdwReason, LPVOID fImpLoad)
*/
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;