mirror of
https://github.com/apache/poi.git
synced 2026-02-27 12:30:08 +08:00
Avoid NPE with malformed master-style
This commit is contained in:
parent
e96c9e17c0
commit
692caf0f36
@ -112,6 +112,10 @@ public final class HSLFSlideMaster extends HSLFMasterSheet {
|
||||
return null;
|
||||
}
|
||||
final TxMasterStyleAtom t = _txmaster[txtype];
|
||||
if (t == null) {
|
||||
throw new IllegalStateException("Cannot get master-style for type " + txtype);
|
||||
}
|
||||
|
||||
final List<TextPropCollection> styles = isCharacter ? t.getCharacterStyles() : t.getParagraphStyles();
|
||||
// TODO: what is the reaction for readOnly=false and styles.isEmpty()?
|
||||
final int minLevel = Math.min(level, styles.size()-1);
|
||||
|
||||
BIN
test-data/slideshow/cf5f6fde99a8b3ea5a4946c258b7abad6f30b0c5.ppt
Normal file
BIN
test-data/slideshow/cf5f6fde99a8b3ea5a4946c258b7abad6f30b0c5.ppt
Normal file
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user