Avoid NPE with broken files when writing endnotes for Word documents

https://issues.oss-fuzz.com/issues/391728757
This commit is contained in:
Dominik Stadler 2026-01-09 08:12:23 +01:00
parent e9b33c0b08
commit c94e795f35
3 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ public class XSLFAutoShape extends XSLFTextShape implements AutoShape<XSLFShape,
static XSLFAutoShape create(CTShape shape, XSLFSheet sheet) {
if (shape.getSpPr().isSetCustGeom()) {
return new XSLFFreeformShape(shape, sheet);
} else if (shape.getNvSpPr().getCNvSpPr().isSetTxBox()) {
} else if (shape.getNvSpPr().getCNvSpPr() != null && shape.getNvSpPr().getCNvSpPr().isSetTxBox()) {
return new XSLFTextBox(shape, sheet);
} else {
return new XSLFAutoShape(shape, sheet);

Binary file not shown.