[PATCH 3 of 4] Restriction for not-null reference gauge added

Wald Commits scm-commit at wald.intevation.org
Mon Apr 23 15:25:27 CEST 2018


# HG changeset patch
# User mschaefer
# Date 1524489756 -7200
# Node ID aab0c2730a258c4051447ecf07fbc124dddebdaa
# Parent  9b9f5f4ddb80e2161156ff9c467001cdff422d07
Restriction for not-null reference gauge added

diff -r 9b9f5f4ddb80 -r aab0c2730a25 artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/RiverInfoProvider.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/RiverInfoProvider.java	Mon Apr 23 15:19:27 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/RiverInfoProvider.java	Mon Apr 23 15:22:36 2018 +0200
@@ -100,7 +100,7 @@
         if (this.showAllGauges)
             return this.gaugeIndex.findGauge(km);
 
-        if (this.refGauge.getRange().contains(km))
+        if ((this.refGauge != null) && this.refGauge.getRange().contains(km))
             return this.refGauge;
 
         return null;


More information about the Dive4Elements-commits mailing list