comparison artifacts/src/main/java/org/dive4elements/river/jfree/AnnotationHelper.java @ 7070:35aabc86566d generator-refactoring

Add NPE guard
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 20 Sep 2013 14:57:26 +0200
parents 06a9a241faac
children 41567bf1e131
comparison
equal deleted inserted replaced
7069:9b52c501c57e 7070:35aabc86566d
84 if (color == null) { 84 if (color == null) {
85 color = Color.BLACK; 85 color = Color.BLACK;
86 } 86 }
87 87
88 LegendItem newItem = new LegendItem(fa.getLabel(), color); 88 LegendItem newItem = new LegendItem(fa.getLabel(), color);
89 LegendSection ls = settings.getLegendSection(); 89 LegendSection ls = (settings != null ?
90 settings.getLegendSection() : null);
90 newItem.setLabelFont (new Font( 91 newItem.setLabelFont (new Font(
91 DEFAULT_FONT_NAME, 92 DEFAULT_FONT_NAME,
92 Font.PLAIN, 93 Font.PLAIN,
93 ls != null ? ls.getFontSize() : null) 94 ls != null ? ls.getFontSize() : null)
94 ); 95 );

http://dive4elements.wald.intevation.org