# HG changeset patch # User Björn Ricks # Date 1351867312 -3600 # Node ID 3c8964855270ff566addaa583c174a540841d589 # Parent 532272d9f2e063a0210552011e46bbb110571fa3 Avoid NullPointerExceptions if no settings are available Don't fail with a NullPointerExceptions if no setting for the axis is available. diff -r 532272d9f2e0 -r 3c8964855270 flys-artifacts/src/main/java/de/intevation/flys/exports/ChartGenerator.java --- a/flys-artifacts/src/main/java/de/intevation/flys/exports/ChartGenerator.java Fri Nov 02 15:38:08 2012 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/ChartGenerator.java Fri Nov 02 15:41:52 2012 +0100 @@ -1177,6 +1177,9 @@ YAxisWalker walker = getYAxisWalker(); AxisSection as = chartSettings.getAxisSection(walker.getId(pos)); + if (as == null) { + return DEFAULT_FONT_SIZE; + } Integer fontSize = as.getFontSize(); return fontSize != null ? fontSize : DEFAULT_FONT_SIZE; @@ -1250,6 +1253,11 @@ } AxisSection as = chartSettings.getAxisSection(axisId); + + if (as == null) { + return null; + } + Boolean fixed = as.isFixed(); if (fixed != null && fixed) {