[PATCH] dataset can be null

Wald Commits scm-commit at wald.intevation.org
Thu Oct 2 10:13:44 CEST 2014


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1412237611 -7200
# Node ID ebf74d92be383ab665ad05747c1e805ef9ce41d3
# Parent  abef2584c9a702c756ae7d2accf84d1db52992f8
dataset can be null.

diff -r abef2584c9a7 -r ebf74d92be38 artifacts/src/main/java/org/dive4elements/river/jfree/AnnotationHelper.java
--- a/artifacts/src/main/java/org/dive4elements/river/jfree/AnnotationHelper.java	Thu Oct 02 09:55:31 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/jfree/AnnotationHelper.java	Thu Oct 02 10:13:31 2014 +0200
@@ -187,7 +187,7 @@
 
         int axisIndex = annotation.getAxisSymbol();
         XYItemRenderer renderer = null;
-        if (dataset.getDatasets().length > 0) {
+        if (dataset != null && dataset.getDatasets().length > 0) {
             renderer = plot.getRendererForDataset(dataset.getDatasets()[0]);
         }
         else {


More information about the Dive4Elements-commits mailing list