From: David ‘Bombe’ Roden Date: Mon, 25 Apr 2011 20:52:04 +0000 (+0200) Subject: Check a reply’s post and its Sone before using those values. X-Git-Tag: 0.6.3^2~9 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=f17403575ea2b0766a307ff322eca7ea4f84ce90;p=Sone.git Check a reply’s post and its Sone before using those values. --- diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java index 7d581d7..9531a6d 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/GetStatusAjaxPage.java @@ -114,7 +114,7 @@ public class GetStatusAjaxPage extends JsonPage { @Override public boolean filterObject(Reply reply) { - return currentSone.hasFriend(reply.getPost().getSone().getId()) || currentSone.equals(reply.getPost().getSone()) || currentSone.equals(reply.getPost().getRecipient()); + return (reply.getPost() != null) && (reply.getPost().getSone() != null) && (currentSone.hasFriend(reply.getPost().getSone().getId()) || currentSone.equals(reply.getPost().getSone()) || currentSone.equals(reply.getPost().getRecipient())); } });