Don’t show a link to an unknown Sone.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 16 Jul 2011 20:29:21 +0000 (22:29 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 16 Jul 2011 20:29:21 +0000 (22:29 +0200)
src/main/java/net/pterodactylus/sone/text/SoneTextParser.java

index 94c3db4..9754ac4 100644 (file)
@@ -182,7 +182,7 @@ public class SoneTextParser implements Parser<SoneTextParserContext> {
                                        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)));