# HG changeset patch # User Felix Wolfsteller # Date 1366019628 -7200 # Node ID 56897ceb5589f6467b9777b3923720851f472e09 # Parent 4ed36858fe0f409752e48084246f4d3edc9afff4 Avoid NPE. diff -r 4ed36858fe0f -r 56897ceb5589 flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/minfo/SedimentLoadYearSelect.java --- 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;