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 260b22fb09a0ea0cb995ba7f9d207f2c46a2676f Author: Dominik Stadler <[email protected]> AuthorDate: Sun Feb 15 18:16:25 2026 +0100 Handle slightly broken file with empty BlipFill properly --- .../java/org/apache/poi/xssf/usermodel/XSSFPicture.java | 2 +- test-data/spreadsheet/npe.xlsx | Bin 0 -> 33326 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPicture.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPicture.java index da377e7ab9..e5207093ff 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPicture.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/usermodel/XSSFPicture.java @@ -268,7 +268,7 @@ public final class XSSFPicture extends XSSFShape implements Picture { */ @Override public XSSFPictureData getPictureData() { - if (ctPicture.getBlipFill().getBlip() == null) { + if (ctPicture.getBlipFill() == null || ctPicture.getBlipFill().getBlip() == null) { return null; } diff --git a/test-data/spreadsheet/npe.xlsx b/test-data/spreadsheet/npe.xlsx new file mode 100644 index 0000000000..ae768405c5 Binary files /dev/null and b/test-data/spreadsheet/npe.xlsx differ --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
