Browse Source

[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
tags/REL_4_0_1
PJ Fanning 5 years ago
parent
commit
621de405a6
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java

+ 2
- 1
src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java 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++;
}
}

Loading…
Cancel
Save