free the NPObject in NPP_Destroy.

This commit is contained in:
Grace Kloba
2009-12-27 13:21:41 -08:00
parent 3bc69e6256
commit a0e762caea

View File

@@ -245,7 +245,10 @@ NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc,
NPError NPP_Destroy(NPP instance, NPSavedData** save)
{
PluginObject *obj = (PluginObject*) instance->pdata;
delete obj->activePlugin;
if (obj) {
delete obj->activePlugin;
browser->releaseobject(&obj->header);
}
return NPERR_NO_ERROR;
}