Author: toad
Date: 2008-08-12 22:36:55 +0000 (Tue, 12 Aug 2008)
New Revision: 21779

Modified:
   
branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java
Log:
Maybe fix an NPE.


Modified: 
branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java
===================================================================
--- 
branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java  
    2008-08-12 22:36:32 UTC (rev 21778)
+++ 
branches/db4o/freenet/src/freenet/client/async/SplitFileFetcherSubSegment.java  
    2008-08-12 22:36:55 UTC (rev 21779)
@@ -781,12 +781,13 @@
                ArrayList<PersistentChosenBlock> blocks = new 
ArrayList<PersistentChosenBlock>();
                for(int i=0;i<blockNumbers.length;i++) {
                        ClientKey key = segment.getBlockKey(blockNumbers[i], 
container);
-                       Key k = key.getNodeKey();
                        if(key == null) {
                                if(logMINOR)
                                        Logger.minor(this, "Block 
"+blockNumbers[i]+" is null, maybe race condition");
                                continue;
                        }
+                       Key k = key.getNodeKey();
+                       container.activate(k, 5);
                        PersistentChosenBlock block = new 
PersistentChosenBlock(false, request, blockNumbers[i], k, key, sched);
                        blocks.add(block);
                }


Reply via email to