Ensure the plugin's native code is never called with an invalid NPP pointer.

This commit is contained in:
Derek Sollenberger
2009-12-01 08:26:20 -05:00
parent e62ce17ac9
commit 51cce58c45
7 changed files with 78 additions and 3 deletions

View File

@@ -45,6 +45,9 @@ extern ANPWindowInterfaceV0 gWindowI;
VideoPlugin::VideoPlugin(NPP inst) : SurfaceSubPlugin(inst) {
// initialize the java interface
m_javaInterface = NULL;
// initialize the drawing surface
m_surface = NULL;
@@ -57,6 +60,7 @@ VideoPlugin::VideoPlugin(NPP inst) : SurfaceSubPlugin(inst) {
}
VideoPlugin::~VideoPlugin() {
setJavaInterface(NULL);
surfaceDestroyed();
}