Anthony Green found a problem with gcjwebplugin. The browser no longer
crashes.

2006-06-08  Tom Fitzsimmons  <[EMAIL PROTECTED]>
            Lillian Angel  <[EMAIL PROTECTED]>

        * native/plugin/gcjwebplugin.cc
        (NP_Shutdown): Added code to free plugin mutex and whitelist 
        file. Also, reset initialized field.
Index: native/plugin/gcjwebplugin.cc
===================================================================
RCS file: /cvsroot/classpath/classpath/native/plugin/gcjwebplugin.cc,v
retrieving revision 1.5
diff -u -r1.5 gcjwebplugin.cc
--- native/plugin/gcjwebplugin.cc	6 Jun 2006 15:43:14 -0000	1.5
+++ native/plugin/gcjwebplugin.cc	8 Jun 2006 15:45:19 -0000
@@ -1740,11 +1740,20 @@
   PLUGIN_DEBUG ("NP_Shutdown");
 
   // Free mutex.
-  g_mutex_free (plugin_instance_mutex);
-  plugin_instance_mutex = NULL;
-
-  g_io_channel_close (whitelist_file);
+  if (plugin_instance_mutex)
+    {
+      g_mutex_free (plugin_instance_mutex);
+      plugin_instance_mutex = NULL;
+    }
 
+  if (whitelist_file)
+    {
+      g_io_channel_close (whitelist_file);
+      whitelist_file = NULL;
+    }
+  
+  initialized = false;
+  
   PLUGIN_DEBUG ("NP_Shutdown return");
 
   return NPERR_NO_ERROR;

Reply via email to