From d523d86314fd46d18f3d72cf088694e272deffab Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 23 Sep 2011 21:04:34 +0200 Subject: [PATCH] =?utf8?q?If=20notification=20does=20not=20exist,=20don?= =?utf8?q?=E2=80=99t=20try=20to=20filter=20it.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../java/net/pterodactylus/sone/web/ajax/GetNotificationAjaxPage.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/GetNotificationAjaxPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/GetNotificationAjaxPage.java index 198a04f..dfac8e4 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/GetNotificationAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/GetNotificationAjaxPage.java @@ -82,6 +82,10 @@ public class GetNotificationAjaxPage extends JsonPage { Sone currentSone = getCurrentSone(request.getToadletContext(), false); for (String notificationId : notificationIds) { Notification notification = webInterface.getNotifications().getNotification(notificationId); + if (notification == null) { + // TODO - show error + continue; + } if ("new-post-notification".equals(notificationId)) { notification = ListNotificationFilters.filterNewPostNotification((ListNotification) notification, currentSone, false); } else if ("new-reply-notification".equals(notificationId)) { -- 2.7.4