[PATCH 2 of 2] MainValuesArtifact: Prevent NPE
Wald Commits
scm-commit at wald.intevation.org
Tue Jul 2 15:33:45 CEST 2013
# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1372772591 -7200
# Node ID cf3065a17057a3bc33a8ebdaa592fcf585bd4be2
# Parent 52d160b16a4ce66ccbc2b1bb0081d60b427918de
MainValuesArtifact: Prevent NPE.
diff -r 52d160b16a4c -r cf3065a17057 artifacts/src/main/java/org/dive4elements/river/artifacts/MainValuesArtifact.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/MainValuesArtifact.java Tue Jul 02 15:36:46 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/MainValuesArtifact.java Tue Jul 02 15:43:11 2013 +0200
@@ -456,10 +456,10 @@
WstValueTable interpolator = WstValueTableFactory.getTable(RiverUtils.getRiver(this));
Calculation c = new Calculation();
- double gaugeStation = gauge.getStation().doubleValue();
double w_out[] = {0.0f};
double q_out[] = {0.0f};
if (gauge != null) {
+ double gaugeStation = gauge.getStation().doubleValue();
List<MainValue> orig = gauge.getMainValues();
for (MainValue mv : orig) {
if (atGauge) {
More information about the Dive4elements-commits
mailing list