mirror of https://github.com/apache/poi.git
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:
parent
bd25521857
commit
dc5f2700a3
|
@ -600,8 +600,15 @@ public final class HSLFTextParagraph implements TextParagraph<HSLFShape,HSLFText
|
||||||
boolean hasColor = getFlag(ParagraphFlagsTextProp.BULLET_HARDCOLOR_IDX);
|
boolean hasColor = getFlag(ParagraphFlagsTextProp.BULLET_HARDCOLOR_IDX);
|
||||||
if (tp == null || !hasColor) {
|
if (tp == null || !hasColor) {
|
||||||
// if bullet color is undefined, return color of first run
|
// 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();
|
SolidPaint sp = _runs.get(0).getFontColor();
|
||||||
|
if(sp == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return DrawPaint.applyColorTransform(sp.getSolidColor());
|
return DrawPaint.applyColorTransform(sp.getSolidColor());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue