diff flys-client/src/main/java/de/intevation/flys/client/client/ui/ThemePanel.java @ 1578:df11c4c8c578

Avoid certain npes. flys-client/trunk@3847 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 01 Feb 2012 08:51:30 +0000
parents 2432973ccced
children 993871f8e2f2
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/ThemePanel.java	Tue Jan 31 15:42:02 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/ThemePanel.java	Wed Feb 01 08:51:30 2012 +0000
@@ -235,11 +235,15 @@
         for (int i = 1; i <= count; i++) {
             Theme theme = themeList.getThemeAt(i);
 
-            if(theme.getFacet().equals("empty.facet")) {
+            if (theme == null) {
+                continue;
+            }
+
+            if (theme.getFacet().equals("empty.facet")) {
                 theme.setVisible(0);
             }
 
-            if (theme == null || theme.getVisible() == 0) {
+            if (theme.getVisible() == 0) {
                 continue;
             }
 

http://dive4elements.wald.intevation.org