}
if (!themeIndexList.isEmpty()) {
- Boolean found = false;
- for (Integer i = 1; i <= themeIndexList.size(); i++) {
+ boolean found = false;
+ for (int i = 1; i <= themeIndexList.size(); i++) {
if (!themeIndexList.contains(i)) {
found = true;
themeIndex = i;
colorRef = _phClr.getVal().toString();
}
// find referenced CTColor in the theme and convert it to java.awt.Color via a recursive call
- CTColor ctColor = theme.getCTColor(colorRef);
+ CTColor ctColor = theme == null ? null : theme.getCTColor(colorRef);
if(ctColor != null) {
color = toColor(ctColor, null);
}