Author: xor
Date: 2008-11-15 22:26:52 +0000 (Sat, 15 Nov 2008)
New Revision: 23614

Modified:
   trunk/plugins/WoT/WoT.java
Log:
Check for != null while terminating.

Modified: trunk/plugins/WoT/WoT.java
===================================================================
--- trunk/plugins/WoT/WoT.java  2008-11-15 22:24:15 UTC (rev 23613)
+++ trunk/plugins/WoT/WoT.java  2008-11-15 22:26:52 UTC (rev 23614)
@@ -160,13 +160,14 @@
        }
        
        public void terminate() {
-               inserter.stop();
-               introductionServer.terminate();
-               introductionClient.terminate();
-               db.commit();
-               db.close();
-               fetcher.stop(); // Do this after cleanly closing the database, 
as it sometimes locks
-               /* FIXME: why does that happen? */
+               if(inserter != null) inserter.stop();
+               if(introductionServer != null) introductionServer.terminate();
+               if(introductionClient != null) introductionClient.terminate();
+               if(fetcher != null) fetcher.stop();
+               if(db != null) {
+                       db.commit();
+                       db.close();
+               }
        }
 
        public String handleHTTPGet(HTTPRequest request) throws 
PluginHTTPException {   

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to