Mercurial > dive4elements > river
changeset 8330:e87a993c6611
Avoid NPE if no dataset is activated in theme list.
author | "Tom Gottfried <tom@intevation.de>" |
---|---|
date | Fri, 26 Sep 2014 08:40:20 +0200 |
parents | 274d606ea50e |
children | 27d42c9ee367 |
files | artifacts/src/main/java/org/dive4elements/river/exports/DischargeGenerator.java |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DischargeGenerator.java Fri Sep 26 08:36:28 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/DischargeGenerator.java Fri Sep 26 08:40:20 2014 +0200 @@ -48,6 +48,11 @@ return; } + if (data.getRange() == null) { + // No active datasets + return; + } + Range range = inCm(data.getRange(), pnpValue); // Do we have an index for W in cm?