From: David ‘Bombe’ Roden Date: Sat, 15 Jan 2011 21:45:34 +0000 (+0100) Subject: Don’t mark anything read if the Sone could not be found. X-Git-Tag: 0.4^2~4 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=2ed1ddb178058125ab3196fde89ba5c08d909f49;p=Sone.git Don’t mark anything read if the Sone could not be found. --- diff --git a/src/main/java/net/pterodactylus/sone/web/ViewSonePage.java b/src/main/java/net/pterodactylus/sone/web/ViewSonePage.java index 9fd6fae..9746afd 100644 --- a/src/main/java/net/pterodactylus/sone/web/ViewSonePage.java +++ b/src/main/java/net/pterodactylus/sone/web/ViewSonePage.java @@ -65,6 +65,9 @@ public class ViewSonePage extends SoneTemplatePage { @Override protected void postProcess(Request request, DataProvider dataProvider) { Sone sone = (Sone) dataProvider.get("sone"); + if (sone == null) { + return; + } List posts = sone.getPosts(); for (Post post : posts) { webInterface.getCore().markPostKnown(post);