r26818 - trunk/freenet/src/freenet/clients/http

[email protected] Wed, 15 Apr 2009 00:39:54 +0000
Newsgroups gmane.network.freenet.cvs
Message-ID <[email protected]>
Author: toad
Date: 2009-04-15 00:39:54 +0000 (Wed, 15 Apr 2009)
New Revision: 26818

Modified:
   trunk/freenet/src/freenet/clients/http/QueueToadlet.java
Log:
Turn NPE into ERROR


Modified: trunk/freenet/src/freenet/clients/http/QueueToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/QueueToadlet.java	2009-04-15 00:24:05 UTC (rev 26817)
+++ trunk/freenet/src/freenet/clients/http/QueueToadlet.java	2009-04-15 00:39:54 UTC (rev 26818)
@@ -1162,7 +1162,11 @@
 
 	private HTMLNode createDownloadCell(PageMaker pageMaker, ClientGet p, ObjectContainer container) {
 		HTMLNode downloadCell = new HTMLNode("td", "class", "request-download");
-		downloadCell.addChild("a", "href", p.getURI(container).toString(), L10n.getString("QueueToadlet.download"));
+		FreenetURI uri = p.getURI(container);
+		if(uri == null)
+			Logger.error(this, "NO URI FOR "+p, new Exception("error"));
+		else
+			downloadCell.addChild("a", "href", uri.toString(), L10n.getString("QueueToadlet.download"));
 		return downloadCell;
 	}