From: David ‘Bombe’ Roden Date: Tue, 12 Apr 2011 16:57:02 +0000 (+0200) Subject: Fix null pointer access when a reply’s post is yet unknown. X-Git-Tag: beta-freefall-0.6.2-1~8^2 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=6310bd26655519f50f654f9e3ccd53e1f625e025;p=Sone.git Fix null pointer access when a reply’s post is yet unknown. --- diff --git a/src/main/java/net/pterodactylus/sone/notify/ListNotificationFilters.java b/src/main/java/net/pterodactylus/sone/notify/ListNotificationFilters.java index 2a98ec8..a6ef8aa 100644 --- a/src/main/java/net/pterodactylus/sone/notify/ListNotificationFilters.java +++ b/src/main/java/net/pterodactylus/sone/notify/ListNotificationFilters.java @@ -125,7 +125,7 @@ public class ListNotificationFilters { } List newReplies = new ArrayList(); for (Reply reply : newReplyNotification.getElements()) { - if (currentSone.hasFriend(reply.getPost().getSone().getId()) || currentSone.equals(reply.getPost().getSone()) || currentSone.equals(reply.getPost().getRecipient())) { + if (((reply.getPost().getSone() != null) && currentSone.hasFriend(reply.getPost().getSone().getId())) || currentSone.equals(reply.getPost().getSone()) || currentSone.equals(reply.getPost().getRecipient())) { newReplies.add(reply); } }