Author: toad
Date: 2009-01-27 18:40:50 +0000 (Tue, 27 Jan 2009)
New Revision: 25327
Modified:
branches/db4o/freenet/src/freenet/client/async/SingleBlockInserter.java
Log:
Logging, avoid NPE
Modified:
branches/db4o/freenet/src/freenet/client/async/SingleBlockInserter.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/SingleBlockInserter.java
2009-01-27 17:59:02 UTC (rev 25326)
+++ branches/db4o/freenet/src/freenet/client/async/SingleBlockInserter.java
2009-01-27 18:40:50 UTC (rev 25327)
@@ -129,6 +129,11 @@
ClientKeyBlock block;
boolean shouldSend;
synchronized(this) {
+ if(finished) return null;
+ if(sourceData == null) {
+ Logger.error(this, "Source data is null on
"+this+" but not finished!");
+ return null;
+ }
block = innerEncode(context.random, container);
shouldSend = (resultingURI == null);
resultingURI = block.getClientKey().getURI();
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs