Don't rely on the plugin methods to return a non-null actor when the say NPERR_NO_ERROR... crashing here is a no-no even if the plugin is stupid.

This commit is contained in:
Benjamin Smedberg 2009-11-11 17:01:07 -05:00
parent e9c5c10cac
commit 661a77e3d4

View File

@ -406,7 +406,10 @@ PluginInstanceParent::NPP_GetValue(NPPVariable aVariable,
return rv; return rv;
} }
NS_ASSERTION(actor, "Null actor!"); if (!actor) {
NS_ERROR("NPPVpluginScriptableNPObject succeeded but null.");
return NPERR_GENERIC_ERROR;
}
const NPNetscapeFuncs* npn = mParent->GetNetscapeFuncs(); const NPNetscapeFuncs* npn = mParent->GetNetscapeFuncs();
if (!npn) { if (!npn) {