diff options
author | Andreas Beeker <kiwiwings@apache.org> | 2020-12-30 23:33:05 +0000 |
---|---|---|
committer | Andreas Beeker <kiwiwings@apache.org> | 2020-12-30 23:33:05 +0000 |
commit | e4b70720be1a5a56f9c0205d7961543c71af0829 (patch) | |
tree | ed887de43029a85ce6714624089834f6887d319b | |
parent | 91eb4861b730610b0860841d5a53f8bdb01eaf30 (diff) | |
download | poi-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.java | 3 | ||||
-rw-r--r-- | test-data/integration/stress022.pptx | bin | 0 -> 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 Binary files differnew file mode 100644 index 0000000000..a89abad919 --- /dev/null +++ b/test-data/integration/stress022.pptx |