From 9c1836d57be5c54d7878a50fb179c2fb4891e984 Mon Sep 17 00:00:00 2001 From: Andreas Beeker 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 7a5bf69009..fa49ae4900 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(); } -- 2.39.5