# HG changeset patch # User Andre Heinecke # Date 1379681846 -7200 # 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,