summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2018-09-28 07:48:29 +0000
committerPJ Fanning <fanningpj@apache.org>2018-09-28 07:48:29 +0000
commit93af1ca43a9e8239c74fb1801516aefefec29be9 (patch)
treee6dd8ed66a1aa3858cf783e8ef3602038292a09d
parentb3f0d80eb65c6b79332eef56b213df1c5f204b86 (diff)
downloadpoi-93af1ca43a9e8239c74fb1801516aefefec29be9.tar.gz
poi-93af1ca43a9e8239c74fb1801516aefefec29be9.zip
fix lgtm issues
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1842218 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/ooxml/java/org/apache/poi/ooxml/POIXMLProperties.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ooxml/java/org/apache/poi/ooxml/POIXMLProperties.java b/src/ooxml/java/org/apache/poi/ooxml/POIXMLProperties.java
index 31dac6a468..3676c3e2ed 100644
--- a/src/ooxml/java/org/apache/poi/ooxml/POIXMLProperties.java
+++ b/src/ooxml/java/org/apache/poi/ooxml/POIXMLProperties.java
@@ -223,7 +223,7 @@ public class POIXMLProperties {
throw new POIXMLException(e);
}
}
- if(extPart != null){
+ if(extPart != null && ext != null && ext.props != null){
try (OutputStream out = extPart.getOutputStream()) {
if (extPart.getSize() > 0) {
extPart.clear();
@@ -231,7 +231,7 @@ public class POIXMLProperties {
ext.props.save(out, DEFAULT_XML_OPTIONS);
}
}
- if(custPart != null){
+ if(custPart != null && cust != null && cust.props != null){
try (OutputStream out = custPart.getOutputStream()) {
cust.props.save(out, DEFAULT_XML_OPTIONS);
}