Skip to content
Snippets Groups Projects
Commit 337bd974 authored by Tim Molter's avatar Tim Molter
Browse files

check for NPE

parent 319c58f2
Branches
No related tags found
No related merge requests found
......@@ -279,7 +279,7 @@ public class Axis implements ChartPart {
String sampleLabel = axisTickCalculator.getTickLabels().get(0);
// find the longest String in all the labels
for (int i = 1; i < axisTickCalculator.getTickLabels().size(); i++) {
if (axisTickCalculator.getTickLabels().get(i).length() > sampleLabel.length()) {
if (axisTickCalculator.getTickLabels().get(i) != null && axisTickCalculator.getTickLabels().get(i).length() > sampleLabel.length()) {
sampleLabel = axisTickCalculator.getTickLabels().get(i);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment