Author: fanningpj Date: Thu Oct 4 07:47:27 2018 New Revision: 1842782 URL: http://svn.apache.org/viewvc?rev=1842782&view=rev Log: [bug-62800] Fix null pointer exception if a picture shape has no blip id
Modified: poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java Modified: poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java?rev=1842782&r1=1842781&r2=1842782&view=diff ============================================================================== --- poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java (original) +++ poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java Thu Oct 4 07:47:27 2018 @@ -701,7 +701,8 @@ implements XSLFShapeContainer, Sheet<XSL 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++; } } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@poi.apache.org For additional commands, e-mail: commits-h...@poi.apache.org