From 1aaf0e2b85093829f024c17b743df57e879c5de1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 4 Dec 2010 23:24:10 +0100 Subject: [PATCH] =?utf8?q?Don=E2=80=99t=20try=20to=20parse=20non-existing?= =?utf8?q?=20text.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/sone/template/PostAccessor.java | 3 +++ 1 file changed, 3 insertions(+) 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) { -- 2.7.4