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 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;
|
||||||
|
|
Loading…
Reference in New Issue