r27096 - trunk/freenet/src/freenet/client/async

[email protected] Mon, 20 Apr 2009 13:11:12 +0000
Newsgroups gmane.network.freenet.cvs
Message-ID <[email protected]>
Author: toad
Date: 2009-04-20 13:11:11 +0000 (Mon, 20 Apr 2009)
New Revision: 27096

Modified:
   trunk/freenet/src/freenet/client/async/USKFetcher.java
Log:
Doh, fix NPE, this can happen


Modified: trunk/freenet/src/freenet/client/async/USKFetcher.java
===================================================================
--- trunk/freenet/src/freenet/client/async/USKFetcher.java	2009-04-20 09:17:43 UTC (rev 27095)
+++ trunk/freenet/src/freenet/client/async/USKFetcher.java	2009-04-20 13:11:11 UTC (rev 27096)
@@ -819,6 +819,7 @@
 						// FIXME not sure this condition works, test it!
 						if(keepLastData && lastRequestData == null && lastEd == origUSK.suggestedEdition)
 							lastEd--; // If we want the data, then get it for the known edition, so we always get the data, so USKInserter can compare it and return the old edition if it is identical.
+						if(attempts[i] == null) continue;
 						if(attempts[i].number > lastEd)
 							attempts[i].schedule(container, context);
 						else {