From d57efd02c9b81e00a94098eb6e4c9ab9cf0d449f Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 1 Feb 2013 08:07:24 +0100 Subject: [PATCH] Fix error when removing reply for unknown post. --- src/main/java/net/pterodactylus/sone/web/WebInterface.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index 3bb11d5..faba61f 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -938,7 +938,7 @@ public class WebInterface { PostReply reply = postReplyRemovedEvent.postReply(); newReplyNotification.remove(reply); localReplyNotification.remove(reply); - if (!getMentionedSones(reply.getText()).isEmpty()) { + if (!getMentionedSones(reply.getText()).isEmpty() && reply.getPost().isPresent()) { boolean isMentioned = false; for (PostReply existingReply : getCore().getReplies(reply.getPost().get())) { isMentioned |= !reply.isKnown() && !getMentionedSones(existingReply.getText()).isEmpty(); -- 2.7.4