Ensure the plugin's native code is never called with an invalid NPP pointer.
diff --git a/samples/BrowserPlugin/jni/PluginObject.h b/samples/BrowserPlugin/jni/PluginObject.h
index 21b7707..691234f 100644
--- a/samples/BrowserPlugin/jni/PluginObject.h
+++ b/samples/BrowserPlugin/jni/PluginObject.h
@@ -61,6 +61,10 @@
virtual void surfaceCreated(jobject) = 0;
virtual void surfaceChanged(int format, int width, int height) = 0;
virtual void surfaceDestroyed() = 0;
+
+ void setJavaInterface(jobject);
+
+ jobject m_javaInterface;
};
enum PluginTypes {