Mercurial > dive4elements > river
changeset 1736:0155cbaba182
XYChartGenerator: Do not crash if no zoom axis given
flys-artifacts/trunk@3025 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 19 Oct 2011 09:59:07 +0000 |
parents | 5966a20fc72c |
children | d26911cac2e4 |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java |
diffstat | 2 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Wed Oct 19 09:43:04 2011 +0000 +++ b/flys-artifacts/ChangeLog Wed Oct 19 09:59:07 2011 +0000 @@ -1,3 +1,8 @@ +2011-10-19 Sascha L. Teichmann <sascha.teichmann@intevation.de> + + * src/main/java/de/intevation/flys/exports/XYChartGenerator.java(zoom): + Do not crash if no axis is given. + 2011-10-19 Ingo Weinzierl <ingo@intevation.de> * src/main/java/de/intevation/flys/exports/ChartGenerator.java: Added
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Wed Oct 19 09:43:04 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/XYChartGenerator.java Wed Oct 19 09:59:07 2011 +0000 @@ -383,6 +383,11 @@ * @return true, if a zoom range was specified, otherwise false. */ protected boolean zoom(XYPlot plot, ValueAxis axis, Range range, Range x) { + + if (range == null) { + return false; + } + if (x != null) { double min = range.getLowerBound(); double max = range.getUpperBound();