Permalink
Browse files

Prevent NPE when template passes null weblog

git-svn-id: https://svn.apache.org/repos/asf/roller/trunk@1243080 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
snoopdave committed Feb 11, 2012
1 parent d163da5 commit f46fc458ae422cd425522a3d59c2f5812c65c5ea
@@ -408,6 +408,12 @@ public void removeWeblogEntry(WeblogEntry entry) throws WebloggerException {
public List getNextPrevEntries(WeblogEntry current, String catName,
String locale, int maxEntries, boolean next)
throws WebloggerException {
+
+ if (current == null) {
+ log.debug("WeblogEntry current cannot be null");
+ return Collections.emptyList();
+ }
+
Query query = null;
List results = null;
WeblogCategory category = null;

0 comments on commit f46fc45

Please sign in to comment.