From f740e30811efaa1f1a0e110218984e242755f897 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 4 Nov 2010 22:44:23 +0100 Subject: [PATCH] =?utf8?q?Return=20null=20when=20the=20insert=20URI=20is?= =?utf8?q?=20null,=20don=E2=80=99t=20NPE.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/sone/data/Sone.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/pterodactylus/sone/data/Sone.java b/src/main/java/net/pterodactylus/sone/data/Sone.java index 0afbf3b..430973c 100644 --- a/src/main/java/net/pterodactylus/sone/data/Sone.java +++ b/src/main/java/net/pterodactylus/sone/data/Sone.java @@ -193,7 +193,7 @@ public class Sone { * @return The insert URI of this Sone */ public FreenetURI getInsertUri() { - return insertUri.setSuggestedEdition(latestEdition); + return (insertUri != null) ? insertUri.setSuggestedEdition(latestEdition) : null; } /** -- 2.7.4