From ff0ba9cb343bb7b006ff5f859ef46e165a4bc29f Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 16 Jul 2011 22:29:21 +0200 Subject: [PATCH] =?utf8?q?Don=E2=80=99t=20show=20a=20link=20to=20an=20unkn?= =?utf8?q?own=20Sone.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/sone/text/SoneTextParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/pterodactylus/sone/text/SoneTextParser.java b/src/main/java/net/pterodactylus/sone/text/SoneTextParser.java index 94c3db4..9754ac4 100644 --- a/src/main/java/net/pterodactylus/sone/text/SoneTextParser.java +++ b/src/main/java/net/pterodactylus/sone/text/SoneTextParser.java @@ -182,7 +182,7 @@ public class SoneTextParser implements Parser { if (line.length() >= (next + 7 + 43)) { String soneId = line.substring(next + 7, next + 50); Sone sone = soneProvider.getSone(soneId, false); - if (sone != null) { + if ((sone != null) && (sone.getName() != null)) { parts.add(new SonePart(sone)); } else { parts.add(new PlainTextPart(line.substring(next, next + 50))); -- 2.7.4