changeset 5850:df5d29987df8

Wst: Avoid NPE.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Fri, 26 Apr 2013 11:08:58 +0200
parents a0a7a8f3bd4a
children 8c777c044025
files backend/src/main/java/org/dive4elements/river/model/Wst.java
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/backend/src/main/java/org/dive4elements/river/model/Wst.java	Fri Apr 26 11:06:55 2013 +0200
+++ b/backend/src/main/java/org/dive4elements/river/model/Wst.java	Fri Apr 26 11:08:58 2013 +0200
@@ -185,6 +185,11 @@
             return null;
         }
 
+        if (results.get(0)[0] == null || results.get(0)[1] == null) {
+            logger.warn("Could not process result from min/maxQ query.");
+            return null;
+        }
+
         Object [] result = results.get(0);
 
         return new double [] {

http://dive4elements.wald.intevation.org