Fix a crash if the Mozilla ActiveX control doesn't implement
DllCanUnloadNow.
This commit is contained in:
parent
23805995a6
commit
6f87386a98
|
@ -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");
|
||||
if (pCanUnloadNow)
|
||||
moz_can_unload = pCanUnloadNow();
|
||||
}
|
||||
else
|
||||
moz_can_unload = S_OK;
|
||||
|
||||
if (moz_can_unload == S_OK && SHDOCVW_refCount == 0)
|
||||
return S_OK;
|
||||
|
|
Loading…
Reference in New Issue