commit | a0e762caeaca275ed8390e9ee1cfb5e9149e07b7 | [log] [tgz] |
---|---|---|
author | Grace Kloba <klobag@google.com> | Sun Dec 27 13:21:41 2009 -0800 |
committer | Grace Kloba <klobag@google.com> | Sun Dec 27 14:33:09 2009 -0800 |
tree | fa2ece057f3d75f83c18d1f2ccb4098d4d0c72c2 | |
parent | 3bc69e6256b616514871276e24bf98f37b3f89ad [diff] [blame] |
free the NPObject in NPP_Destroy.
diff --git a/samples/BrowserPlugin/jni/main.cpp b/samples/BrowserPlugin/jni/main.cpp index 5bbb648..85632e4 100644 --- a/samples/BrowserPlugin/jni/main.cpp +++ b/samples/BrowserPlugin/jni/main.cpp
@@ -245,7 +245,10 @@ 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; }