Skip to content

Commit 8cb8766

Browse files
Grace KlobaAndroid Git Automerger
authored andcommitted
am 653b97e: am a0e762c: free the NPObject in NPP_Destroy.
Merge commit '653b97e701546e816f75167280bf87b665a47b2c' * commit '653b97e701546e816f75167280bf87b665a47b2c': free the NPObject in NPP_Destroy.
2 parents df2b196 + 653b97e commit 8cb8766

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

samples/BrowserPlugin/jni/main.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,10 @@ NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc,
245245
NPError NPP_Destroy(NPP instance, NPSavedData** save)
246246
{
247247
PluginObject *obj = (PluginObject*) instance->pdata;
248-
delete obj->activePlugin;
248+
if (obj) {
249+
delete obj->activePlugin;
250+
browser->releaseobject(&obj->header);
251+
}
249252

250253
return NPERR_NO_ERROR;
251254
}

0 commit comments

Comments
 (0)