From 99f81eb82982d630a9a9990e27c7cc8ea30563ce Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 28 Apr 2011 06:44:31 +0200 Subject: [PATCH] =?utf8?q?Don=E2=80=99t=20link=20to=20unknown=20posts.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/sone/text/FreenetLinkParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/pterodactylus/sone/text/FreenetLinkParser.java b/src/main/java/net/pterodactylus/sone/text/FreenetLinkParser.java index 0f6887d..4b88acc 100644 --- a/src/main/java/net/pterodactylus/sone/text/FreenetLinkParser.java +++ b/src/main/java/net/pterodactylus/sone/text/FreenetLinkParser.java @@ -265,7 +265,7 @@ public class FreenetLinkParser implements Parser { } else if (linkType == LinkType.POST) { String postId = link.substring(7); Post post = core.getPost(postId, false); - if (post != null) { + if ((post != null) && (post.getSone() != null)) { String postText = post.getText(); postText = postText.substring(0, Math.min(postText.length(), 20)) + "…"; Sone postSone = post.getSone(); -- 2.7.4