[PATCH 4 of 5] Add NPE guard
Wald Commits
scm-commit at wald.intevation.org
Fri Sep 20 14:59:06 CEST 2013
# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1379681846 -7200
# Branch generator-refactoring
# Node ID 35aabc86566d01b39593b8118ebaf11181cf3ed7
# Parent 9b52c501c57e02bf41c027c055700aae52cae75c
Add NPE guard
diff -r 9b52c501c57e -r 35aabc86566d artifacts/src/main/java/org/dive4elements/river/jfree/AnnotationHelper.java
--- a/artifacts/src/main/java/org/dive4elements/river/jfree/AnnotationHelper.java Fri Sep 20 14:56:46 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/jfree/AnnotationHelper.java Fri Sep 20 14:57:26 2013 +0200
@@ -86,7 +86,8 @@
}
LegendItem newItem = new LegendItem(fa.getLabel(), color);
- LegendSection ls = settings.getLegendSection();
+ LegendSection ls = (settings != null ?
+ settings.getLegendSection() : null);
newItem.setLabelFont (new Font(
DEFAULT_FONT_NAME,
Font.PLAIN,
More information about the Dive4elements-commits
mailing list