poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fannin...@apache.org
Subject svn commit: r1842782 - /poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java
Date Thu, 04 Oct 2018 07:47:27 GMT
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-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message