You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by ag...@apache.org on 2005/12/22 22:35:38 UTC

svn commit: r358641 - /incubator/roller/trunk/src/org/roller/presentation/velocity/MathCommentAuthenticator.java

Author: agilliland
Date: Thu Dec 22 13:35:35 2005
New Revision: 358641

URL: http://svn.apache.org/viewcvs?rev=358641&view=rev
Log:
one more null pointer problem.


Modified:
    incubator/roller/trunk/src/org/roller/presentation/velocity/MathCommentAuthenticator.java

Modified: incubator/roller/trunk/src/org/roller/presentation/velocity/MathCommentAuthenticator.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/presentation/velocity/MathCommentAuthenticator.java?rev=358641&r1=358640&r2=358641&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/presentation/velocity/MathCommentAuthenticator.java (original)
+++ incubator/roller/trunk/src/org/roller/presentation/velocity/MathCommentAuthenticator.java Thu Dec 22 13:35:35 2005
@@ -77,7 +77,7 @@
                 int answer = Integer.parseInt(answerString);
                 Integer sum = (Integer) session.getAttribute("mathAnswer");
                 
-                if (answer == sum.intValue()) {
+                if (sum != null && answer == sum.intValue()) {
                     authentic = true;
                     session.removeAttribute("mathAnswer");
                     session.removeAttribute("mathValue1");