changeset 5701:56897ceb5589

Avoid NPE.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Mon, 15 Apr 2013 11:53:48 +0200
parents 4ed36858fe0f
children de0639306008 3ff4f772bcac
files flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/minfo/SedimentLoadYearSelect.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/minfo/SedimentLoadYearSelect.java	Mon Apr 15 11:17:50 2013 +0200
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/minfo/SedimentLoadYearSelect.java	Mon Apr 15 11:53:48 2013 +0200
@@ -39,7 +39,7 @@
         SedimentLoadAccess access = new SedimentLoadAccess((FLYSArtifact) artifact, null);
 
         // Second year should be later than first.
-        if (access.getPeriod()[1] < access.getPeriod()[0])
+        if (access.getPeriod() != null && access.getPeriod()[1] < access.getPeriod()[0])
            throw new IllegalArgumentException("error_years_wrong");
 
         return true;

http://dive4elements.wald.intevation.org