changeset 7156:2d690611d110

Add NPE guard to XYStyle.
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 25 Sep 2013 18:04:49 +0200 (2013-09-25)
parents 34b5e7ef2a36
children ab109ae2acc6
files artifacts/src/main/java/org/dive4elements/river/jfree/XYStyle.java
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/jfree/XYStyle.java	Wed Sep 25 18:04:14 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/jfree/XYStyle.java	Wed Sep 25 18:04:49 2013 +0200
@@ -41,7 +41,11 @@
      * whether to draw lines and/or points.
      */
     @Override
-    public XYLineAndShapeRenderer applyTheme(XYLineAndShapeRenderer r, int idx){
+    public XYLineAndShapeRenderer applyTheme(XYLineAndShapeRenderer r, int idx) {
+        if (theme == null) {
+            // Hurray we already applied nothing :)
+            return r;
+        }
         this.renderer = r;
         applyLineColor(r, idx);
         applyLineSize(r, idx);

http://dive4elements.wald.intevation.org