comparison 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
comparison
equal deleted inserted replaced
1577:322f2626fb5d 1578:df11c4c8c578
233 int count = themeList.getThemeCount(); 233 int count = themeList.getThemeCount();
234 234
235 for (int i = 1; i <= count; i++) { 235 for (int i = 1; i <= count; i++) {
236 Theme theme = themeList.getThemeAt(i); 236 Theme theme = themeList.getThemeAt(i);
237 237
238 if(theme.getFacet().equals("empty.facet")) { 238 if (theme == null) {
239 continue;
240 }
241
242 if (theme.getFacet().equals("empty.facet")) {
239 theme.setVisible(0); 243 theme.setVisible(0);
240 } 244 }
241 245
242 if (theme == null || theme.getVisible() == 0) { 246 if (theme.getVisible() == 0) {
243 continue; 247 continue;
244 } 248 }
245 249
246 FacetRecord newRecord = createRecord(theme); 250 FacetRecord newRecord = createRecord(theme);
247 addFacetRecord(newRecord); 251 addFacetRecord(newRecord);

http://dive4elements.wald.intevation.org