From: David ‘Bombe’ Roden Date: Fri, 1 Feb 2013 07:07:24 +0000 (+0100) Subject: Fix error when removing reply for unknown post. X-Git-Tag: 0.8.5^2~3^2~27 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=d57efd02c9b81e00a94098eb6e4c9ab9cf0d449f Fix error when removing reply for unknown post. --- 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();