This is an automated email from the ASF dual-hosted git repository.

centic9 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/poi.git

commit 3263f814984c0d6340482c12b6d97f70b5318076
Author: Dominik Stadler <[email protected]>
AuthorDate: Tue Nov 3 11:22:37 2026 +0100

    Avoid NPE when reading flags of header and footer
---
 .../java/org/apache/poi/hslf/model/HeadersFooters.java |   2 +-
 .../crash-74c33084f66628ba85e4ab8e71374d39915db381.ppt | Bin 0 -> 103936 bytes
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/poi-scratchpad/src/main/java/org/apache/poi/hslf/model/HeadersFooters.java 
b/poi-scratchpad/src/main/java/org/apache/poi/hslf/model/HeadersFooters.java
index 0fb2e3e08e..ff44ca26ec 100644
--- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/model/HeadersFooters.java
+++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/model/HeadersFooters.java
@@ -277,7 +277,7 @@ public final class HeadersFooters {
             HSLFSimpleShape ss = _sheet.getPlaceholder(placeholderId);
             visible = ss instanceof HSLFTextShape textShape && 
textShape.getText() != null;
         } else {
-            visible = _container.getHeadersFootersAtom().getFlag(flag);
+            visible = _container.getHeadersFootersAtom() != null && 
_container.getHeadersFootersAtom().getFlag(flag);
         }
         return visible;
     }
diff --git 
a/test-data/slideshow/crash-74c33084f66628ba85e4ab8e71374d39915db381.ppt 
b/test-data/slideshow/crash-74c33084f66628ba85e4ab8e71374d39915db381.ppt
new file mode 100644
index 0000000000..3ce9e3b015
Binary files /dev/null and 
b/test-data/slideshow/crash-74c33084f66628ba85e4ab8e71374d39915db381.ppt differ


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to