From: David ‘Bombe’ Roden Date: Sat, 16 Jul 2011 20:29:21 +0000 (+0200) Subject: Don’t show a link to an unknown Sone. X-Git-Tag: 0.6.6^2~9 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=ff0ba9cb343bb7b006ff5f859ef46e165a4bc29f;p=Sone.git Don’t show a link to an unknown Sone. --- 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)));