aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2016-01-13 19:45:49 +0000
committerDominik Stadler <centic@apache.org>2016-01-13 19:45:49 +0000
commitdc5f2700a3009d020f1149d15866f02b3f274f15 (patch)
treed66d4229cb265bb71101d21276d81420a75b591b /src
parentbd25521857c9d1b2983f3203588e7560b53aa165 (diff)
downloadpoi-dc5f2700a3009d020f1149d15866f02b3f274f15.tar.gz
poi-dc5f2700a3009d020f1149d15866f02b3f274f15.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java
index ceb4853e30..5a050f5e13 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java
@@ -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());
}