diff --git a/src/scratchpad/src/org/apache/poi/hslf/usermodel/SlideShow.java b/src/scratchpad/src/org/apache/poi/hslf/usermodel/SlideShow.java index de85bf908..817bd0ce5 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/usermodel/SlideShow.java +++ b/src/scratchpad/src/org/apache/poi/hslf/usermodel/SlideShow.java @@ -224,6 +224,12 @@ public class SlideShow } } + // Ensure we really found a Document record + // If we didn't, then the file is probably corrupt + if(documentRecord == null) { + throw new IllegalStateException("The PowerPoint file didn't contain a Document Record in its PersistPtr blocks. It is probably corrupt."); + } + // Now look for SlideListWithTexts in the most up-to-date Document Record //