mirror of
https://github.com/apache/poi.git
synced 2026-02-27 12:30:08 +08:00
Avoid NPE when reading a broken pptx file
This commit is contained in:
parent
a5f5f4294e
commit
b401b92aea
@ -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()),
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user