You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2010/03/11 12:05:32 UTC

svn commit: r921798 - /myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java

Author: lofwyr
Date: Thu Mar 11 11:05:32 2010
New Revision: 921798

URL: http://svn.apache.org/viewvc?rev=921798&view=rev
Log:
prevent NPE

Modified:
    myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java

Modified: myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java?rev=921798&r1=921797&r2=921798&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java (original)
+++ myfaces/tobago/trunk/example/demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java Thu Mar 11 11:05:32 2010
@@ -159,11 +159,11 @@ public class Navigation {
   }
 
   public boolean isFirst() {
-    return state.getMarker().getPreviousNode().isRoot();
+    return state.getMarker() != null && state.getMarker().getPreviousNode().isRoot();
   }
 
   public boolean isLast() {
-    return state.getMarker().getNextNode() == null;
+    return state.getMarker() != null && state.getMarker().getNextNode() == null;
   }
 
   public String viewSource() {