changeset 8629:97365575da6f

Handle the case where the period panel is used in a state without start and end
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 26 Mar 2015 12:07:43 +0100
parents a5439a609625
children 5210e1dd303e
files gwt-client/src/main/java/org/dive4elements/river/client/client/ui/PeriodPanel.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/PeriodPanel.java	Thu Mar 26 12:06:47 2015 +0100
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/PeriodPanel.java	Thu Mar 26 12:07:43 2015 +0100
@@ -97,7 +97,8 @@
         /* Try to find default values for the periods */
         Data start = getData(data.getAll(), startName);
         Data end = getData(data.getAll(), endName);
-        if (start.getItems() == null || end.getItems() == null) {
+        if (start == null || end == null ||
+            start.getItems() == null || end.getItems() == null) {
             return layout;
         }
 

http://dive4elements.wald.intevation.org