Fix a NullPointerException that occurs with some PPTs now but did not in POI 3.13

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1724487 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Dominik Stadler 2016-01-13 19:45:49 +00:00
parent bd25521857
commit dc5f2700a3
2 changed files with 8 additions and 1 deletions

View File

@ -600,8 +600,15 @@ public final class HSLFTextParagraph implements TextParagraph<HSLFShape,HSLFText
boolean hasColor = getFlag(ParagraphFlagsTextProp.BULLET_HARDCOLOR_IDX);
if (tp == null || !hasColor) {
// if bullet color is undefined, return color of first run
if (_runs.isEmpty()) return null;
if (_runs.isEmpty()) {
return null;
}
SolidPaint sp = _runs.get(0).getFontColor();
if(sp == null) {
return null;
}
return DrawPaint.applyColorTransform(sp.getSolidColor());
}