[Dive4elements-commits] [PATCH] Prevent NPE when color for bandwidth is unset, use non-template default

Wald Commits scm-commit at wald.intevation.org
Wed Dec 5 13:29:26 CET 2012


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1354710887 -3600
# Node ID d70284c92728e3b15b93bb48fd5d598ef3b29afb
# Parent  105463e2234f4d1f426e578b27ace28be583d204
Prevent NPE when color for bandwidth is unset, use non-template default.

diff -r 105463e2234f -r d70284c92728 flys-artifacts/src/main/java/de/intevation/flys/jfree/StyledAreaSeriesCollection.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/jfree/StyledAreaSeriesCollection.java	Wed Dec 05 12:59:32 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/jfree/StyledAreaSeriesCollection.java	Wed Dec 05 13:34:47 2012 +0100
@@ -87,7 +87,7 @@
                 ThemeUtil.getBackgroundColorString(theme));
 
         int transparency = ThemeUtil.parseTransparency(theme);
-        if (transparency > 0) {
+        if (transparency > 0 && paint != null) {
             paint = new Color(
                         paint.getRed(),
                         paint.getGreen(),


More information about the Dive4elements-commits mailing list