Fix NPE in case when we can't find the Document atom: throw an IllegalState instead

git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353797 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2005-11-24 10:46:45 +00:00
parent efbf7f9f5d
commit f7a9a1ca7b

View File

@ -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
//