Don’t mark anything read if the Sone could not be found.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 15 Jan 2011 21:45:34 +0000 (22:45 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 15 Jan 2011 21:45:34 +0000 (22:45 +0100)
src/main/java/net/pterodactylus/sone/web/ViewSonePage.java

index 9fd6fae..9746afd 100644 (file)
@@ -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<Post> posts = sone.getPosts();
                for (Post post : posts) {
                        webInterface.getCore().markPostKnown(post);