Don’t try to parse non-existing text.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 4 Dec 2010 22:24:10 +0000 (23:24 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 4 Dec 2010 22:24:10 +0000 (23:24 +0100)
src/main/java/net/pterodactylus/sone/template/PostAccessor.java

index 746ed25..495d805 100644 (file)
@@ -75,6 +75,9 @@ public class PostAccessor extends ReflectionAccessor {
                        return core.isNewPost(post.getId(), false);
                } else if (member.equals("text")) {
                        String text = post.getText();
+                       if (text == null) {
+                               return null;
+                       }
                        try {
                                return linkParser.parse(new StringReader(text));
                        } catch (IOException ioe1) {