Author: agilliland
Date: Thu Jan 26 18:30:58 2006
New Revision: 372704

URL: http://svn.apache.org/viewcvs?rev=372704&view=rev
Log:
fixing null pointer exception in getPageIdByName() method.


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

Modified: 
incubator/roller/trunk/src/org/roller/presentation/velocity/PageModel.java
URL: 
http://svn.apache.org/viewcvs/incubator/roller/trunk/src/org/roller/presentation/velocity/PageModel.java?rev=372704&r1=372703&r2=372704&view=diff
==============================================================================
--- incubator/roller/trunk/src/org/roller/presentation/velocity/PageModel.java 
(original)
+++ incubator/roller/trunk/src/org/roller/presentation/velocity/PageModel.java 
Thu Jan 26 18:30:58 2006
@@ -254,7 +254,9 @@
         
         try {
             Template pd = mWebsite.getPageByName(pageName);
-            template_id = pd.getId();
+            if(pd != null) {
+                template_id = pd.getId();
+            }
         } catch(Exception e) {
             mLogger.error(e);
         }


Reply via email to