Author: toad
Date: 2008-10-29 20:26:09 +0000 (Wed, 29 Oct 2008)
New Revision: 23192

Modified:
   branches/db4o/freenet/src/freenet/client/async/SingleBlockInserter.java
Log:
If can't encode, don't return the block.


Modified: 
branches/db4o/freenet/src/freenet/client/async/SingleBlockInserter.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/SingleBlockInserter.java     
2008-10-29 20:25:37 UTC (rev 23191)
+++ branches/db4o/freenet/src/freenet/client/async/SingleBlockInserter.java     
2008-10-29 20:26:09 UTC (rev 23192)
@@ -434,7 +434,9 @@

        @Override
        public List<PersistentChosenBlock> makeBlocks(PersistentChosenRequest 
request, RequestScheduler sched, ObjectContainer container, ClientContext 
context) {
-               PersistentChosenBlock block = new PersistentChosenBlock(true, 
request, getBlock(container, context, false), null, null, sched);
+               ClientKeyBlock encoded = getBlock(container, context, false);
+               if(encoded == null) return null;
+               PersistentChosenBlock block = new PersistentChosenBlock(true, 
request, encoded, null, null, sched);
                return Collections.singletonList(block);
        }



Reply via email to