[PATCH 4 of 5] issue1235: Avoid NPE
Wald Commits
scm-commit at wald.intevation.org
Fri Jun 28 13:51:30 CEST 2013
# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1372420785 -7200
# Node ID 857f4d51d859c79eda0c4f7eff791dd4d427f58b
# Parent 686bbfeacfe5011f22c2a62272cabbf359d93b3e
issue1235: Avoid NPE.
diff -r 686bbfeacfe5 -r 857f4d51d859 artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java Fri Jun 28 13:59:15 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadCalculation.java Fri Jun 28 13:59:45 2013 +0200
@@ -449,7 +449,7 @@
lastSuspRange = null;
lastOtherValue = total - lastSuspValue;
}
- if (Math.abs(lastSuspRange.getEnd() - lastOtherRange.getEnd()) < 0.1d) {
+ if (lastSuspRange != null && Math.abs(lastSuspRange.getEnd() - lastOtherRange.getEnd()) < 0.1d) {
lastOtherRange = null;
lastSuspRange = null;
}
More information about the Dive4elements-commits
mailing list