From 3ff9eb5f0de4cbda98392bc500ba55eb5ca8bafe Mon Sep 17 00:00:00 2001 From: kiwiwings Date: Wed, 21 Dec 2016 22:03:54 +0000 Subject: [PATCH] Fix 0-pointer on unset document git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1775565 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/poi/poifs/filesystem/DocumentNode.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/poi/poifs/filesystem/DocumentNode.java b/src/java/org/apache/poi/poifs/filesystem/DocumentNode.java index 7a5bf6900..fa49ae490 100644 --- a/src/java/org/apache/poi/poifs/filesystem/DocumentNode.java +++ b/src/java/org/apache/poi/poifs/filesystem/DocumentNode.java @@ -134,7 +134,9 @@ public class DocumentNode List components = new ArrayList(); components.add(getProperty()); - components.add(_document); + if (_document != null) { + components.add(_document); + } return components.iterator(); }