[bug-62800] Fix null pointer exception if a picture shape has no blip id

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1842782 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2018-10-04 07:47:27 +00:00
parent 5430141cfb
commit 01ad2f9d1a
1 changed files with 2 additions and 1 deletions

View File

@ -701,7 +701,8 @@ implements XSLFShapeContainer, Sheet<XSLFShape,XSLFTextParagraph> {
for (XSLFShape shape : pictureShape.getSheet().getShapes()) {
if (shape instanceof XSLFPictureShape) {
XSLFPictureShape currentPictureShape = ((XSLFPictureShape) shape);
if (currentPictureShape.getBlipId().equals(targetBlipId)) {
String currentBlipId = currentPictureShape.getBlipId();
if (currentBlipId != null && currentBlipId.equals(targetBlipId)) {
numberOfRelations++;
}
}