Avoid NPE when reading a broken pptx file

This commit is contained in:
Dominik Stadler 2026-01-10 17:12:04 +01:00
parent a5f5f4294e
commit b401b92aea
2 changed files with 2 additions and 2 deletions

View File

@ -189,7 +189,7 @@ public class XSLFPictureShape extends XSLFSimpleShape
}
protected CTBlip getBlip(){
return getBlipFill().getBlip();
return getBlipFill() == null ? null : getBlipFill().getBlip();
}
@SuppressWarnings("WeakerAccess")
@ -216,7 +216,7 @@ public class XSLFPictureShape extends XSLFSimpleShape
@Override
public Insets getClipping(){
CTRelativeRect r = getBlipFill().getSrcRect();
CTRelativeRect r = getBlipFill() == null ? null : getBlipFill().getSrcRect();
return (r == null) ? null : new Insets(
POIXMLUnits.parsePercent(r.xgetT()),