From: David ‘Bombe’ Roden Date: Sat, 4 Dec 2010 22:24:10 +0000 (+0100) Subject: Don’t try to parse non-existing text. X-Git-Tag: 0.3.2-RC5~3 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=1aaf0e2b85093829f024c17b743df57e879c5de1;p=Sone.git Don’t try to parse non-existing text. --- diff --git a/src/main/java/net/pterodactylus/sone/template/PostAccessor.java b/src/main/java/net/pterodactylus/sone/template/PostAccessor.java index 746ed25..495d805 100644 --- a/src/main/java/net/pterodactylus/sone/template/PostAccessor.java +++ b/src/main/java/net/pterodactylus/sone/template/PostAccessor.java @@ -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) {