Mercurial > dive4elements > river
changeset 7070:35aabc86566d generator-refactoring
Add NPE guard
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Fri, 20 Sep 2013 14:57:26 +0200 |
parents | 9b52c501c57e |
children | 50342c451512 |
files | artifacts/src/main/java/org/dive4elements/river/jfree/AnnotationHelper.java |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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,