Author: toad
Date: 2009-03-07 13:10:14 +0000 (Sat, 07 Mar 2009)
New Revision: 25924

Modified:
   branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java
Log:
Fix NPE in transient inserts


Modified: branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java      
2009-03-07 12:32:34 UTC (rev 25923)
+++ branches/db4o/freenet/src/freenet/client/async/SingleFileInserter.java      
2009-03-07 13:10:14 UTC (rev 25924)
@@ -592,7 +592,7 @@
                                        finished = true;
                                }
                        }
-                       if(toRemove != null)
+                       if(toRemove != null && persistent)
                                toRemove.removeFrom(container, context);
                        if(persistent)
                                container.store(this);
@@ -629,7 +629,7 @@
                                        toFail = false; // Already failed
                                }
                        }
-                       if(toRemove)
+                       if(toRemove && persistent)
                                state.removeFrom(container, context);
                        if(toFail)
                        fail(e, container, context);

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

Reply via email to