This is an automated email from the ASF dual-hosted git repository. centic pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/poi.git
commit ac989335d79bd68323dc00df4f9be0e790420a54 Author: Dominik Stadler <[email protected]> AuthorDate: Wed Jan 7 00:34:22 2026 +0100 Avoid NPE with broken files when handling text-shapes --- .../apache/poi/hslf/usermodel/HSLFTextShape.java | 2 +- .../6afff8111a22b118d1ed4eba5007c153de0b0ad7.ppt | Bin 0 -> 129536 bytes test-data/spreadsheet/stress.xls | Bin 73728 -> 73728 bytes 3 files changed, 1 insertion(+), 1 deletion(-) diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFTextShape.java b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFTextShape.java index 1efae0f478..681aaadca8 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFTextShape.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hslf/usermodel/HSLFTextShape.java @@ -351,7 +351,7 @@ implements TextShape<HSLFShape,HSLFTextParagraph> { return -1; } List<HSLFTextParagraph> paras = HSLFTextParagraph.findTextParagraphs(_txtbox, getSheet()); - return (paras.isEmpty() || paras.get(0).getIndex() == -1) ? -1 : paras.get(0).getRunType(); + return (paras == null || paras.isEmpty() || paras.get(0).getIndex() == -1) ? -1 : paras.get(0).getRunType(); } /** diff --git a/test-data/slideshow/6afff8111a22b118d1ed4eba5007c153de0b0ad7.ppt b/test-data/slideshow/6afff8111a22b118d1ed4eba5007c153de0b0ad7.ppt new file mode 100644 index 0000000000..6bdb60f21a Binary files /dev/null and b/test-data/slideshow/6afff8111a22b118d1ed4eba5007c153de0b0ad7.ppt differ diff --git a/test-data/spreadsheet/stress.xls b/test-data/spreadsheet/stress.xls index 40c8ad9c04..5bf30b98ef 100644 Binary files a/test-data/spreadsheet/stress.xls and b/test-data/spreadsheet/stress.xls differ --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
