roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agillil...@apache.org
Subject svn commit: r546191 - /roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/themes/WeblogSharedTheme.java
Date Mon, 11 Jun 2007 16:46:06 GMT
Author: agilliland
Date: Mon Jun 11 09:46:05 2007
New Revision: 546191

URL: http://svn.apache.org/viewvc?view=rev&rev=546191
Log:
fix for ROL-1445, an NPE caused when a theme doesn't have a stylesheet defined.


Modified:
    roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/themes/WeblogSharedTheme.java

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/themes/WeblogSharedTheme.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/themes/WeblogSharedTheme.java?view=diff&rev=546191&r1=546190&r2=546191
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/themes/WeblogSharedTheme.java
(original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/themes/WeblogSharedTheme.java
Mon Jun 11 09:46:05 2007
@@ -178,7 +178,7 @@
         
         // if name refers to the stylesheet then return result of getStylesheet()
         ThemeTemplate stylesheet = getStylesheet();
-        if(name.equals(stylesheet.getName())) {
+        if(stylesheet != null && name.equals(stylesheet.getName())) {
             return stylesheet;
         }
         
@@ -209,7 +209,7 @@
         
         // if name refers to the stylesheet then return result of getStylesheet()
         ThemeTemplate stylesheet = getStylesheet();
-        if(link.equals(stylesheet.getLink())) {
+        if(stylesheet != null && link.equals(stylesheet.getLink())) {
             return stylesheet;
         }
         



Mime
View raw message