Author: toad
Date: 2009-03-27 14:38:46 +0000 (Fri, 27 Mar 2009)
New Revision: 26234

Modified:
   branches/db4o/freenet/src/freenet/client/async/SingleFileFetcher.java
Log:
Fix NPEs


Modified: branches/db4o/freenet/src/freenet/client/async/SingleFileFetcher.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/SingleFileFetcher.java       
2009-03-27 14:38:32 UTC (rev 26233)
+++ branches/db4o/freenet/src/freenet/client/async/SingleFileFetcher.java       
2009-03-27 14:38:46 UTC (rev 26234)
@@ -987,7 +987,7 @@
                        }
                        if(!wasActive)
                                container.deactivate(SingleFileFetcher.this, 1);
-                       if(state != null)
+                       if(persistent && state != null)
                                state.removeFrom(container, context);
                        if(persistent)
                                container.delete(this);
@@ -1003,7 +1003,7 @@
                        SingleFileFetcher.this.onFailure(e, true, container, 
context);
                        if(!wasActive)
                                container.deactivate(SingleFileFetcher.this, 1);
-                       if(state != null)
+                       if(persistent && state != null)
                                state.removeFrom(container, context);
                        if(persistent)
                                container.delete(this);

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

Reply via email to