changeset 4354:e0add97c432b

Circumvent NPE in Curve. issue flys/1019
author Sascha L. Teichmann <teichmann@intevation.de>
date Fri, 02 Nov 2012 11:02:15 +0100
parents daf0919df76d
children d095b4267772
files flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/extreme/Curve.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/extreme/Curve.java	Thu Nov 01 15:16:01 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/extreme/Curve.java	Fri Nov 02 11:02:15 2012 +0100
@@ -82,7 +82,7 @@
     /** Calculate value at given x. */
     @Override
     public double value(double x) {
-        if (x < qs[0]) return Double.NaN;
+        if (qs == null || x < qs[0]) return Double.NaN;
         return (x <= qs[qs.length-1]
             ? getSpline()
             : getExtrapolation()).value(x);

http://dive4elements.wald.intevation.org