Don’t try to parse non-existing text.
[Sone.git] / 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) {