aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2020-12-30 23:33:05 +0000
committerAndreas Beeker <kiwiwings@apache.org>2020-12-30 23:33:05 +0000
commite4b70720be1a5a56f9c0205d7961543c71af0829 (patch)
treeed887de43029a85ce6714624089834f6887d319b
parent91eb4861b730610b0860841d5a53f8bdb01eaf30 (diff)
downloadpoi-e4b70720be1a5a56f9c0205d7961543c71af0829.tar.gz
poi-e4b70720be1a5a56f9c0205d7961543c71af0829.zip
workaround NullPointerException when font family (of bullets) can't be determined
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884974 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java3
-rw-r--r--test-data/integration/stress022.pptxbin0 -> 866381 bytes
2 files changed, 2 insertions, 1 deletions
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java
index 9b3dae4e5e..a30571f16e 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java
@@ -858,7 +858,8 @@ public class XSLFTextParagraph implements TextParagraph<XSLFShape,XSLFTextParagr
@Override
public String getDefaultFontFamily() {
- return (_runs.isEmpty() ? "Arial" : _runs.get(0).getFontFamily());
+ String family = (_runs.isEmpty() ? null : _runs.get(0).getFontFamily());
+ return (family == null) ? "Arial" : family;
}
@Override
diff --git a/test-data/integration/stress022.pptx b/test-data/integration/stress022.pptx
new file mode 100644
index 0000000000..a89abad919
--- /dev/null
+++ b/test-data/integration/stress022.pptx
Binary files differ