Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/DischargeGenerator.java @ 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 | d6c03537970e |
children | ac7cb15e1946 |
comparison
equal
deleted
inserted
replaced
8329:274d606ea50e | 8330:e87a993c6611 |
---|---|
46 if (data == null) { | 46 if (data == null) { |
47 // No W axis | 47 // No W axis |
48 return; | 48 return; |
49 } | 49 } |
50 | 50 |
51 if (data.getRange() == null) { | |
52 // No active datasets | |
53 return; | |
54 } | |
55 | |
51 Range range = inCm(data.getRange(), pnpValue); | 56 Range range = inCm(data.getRange(), pnpValue); |
52 | 57 |
53 // Do we have an index for W in cm? | 58 // Do we have an index for W in cm? |
54 NumberAxis wInCmAxis = createWinCMAxis(wAxisIndex); | 59 NumberAxis wInCmAxis = createWinCMAxis(wAxisIndex); |
55 wInCmAxis.setRange(range.getLowerBound(), range.getUpperBound()); | 60 wInCmAxis.setRange(range.getLowerBound(), range.getUpperBound()); |