poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cen...@apache.org
Subject svn commit: r1674952 - in /poi/trunk: src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFImageRenderer.java test-data/slideshow/at.ecodesign.www_downloads_Vertiefungsvortrag_elektronik.pptx
Date Mon, 20 Apr 2015 18:10:44 GMT
Author: centic
Date: Mon Apr 20 18:10:43 2015
New Revision: 1674952

URL: http://svn.apache.org/r1674952
Log:
Avoid NullPointerException if an image cannot be read

Added:
    poi/trunk/test-data/slideshow/at.ecodesign.www_downloads_Vertiefungsvortrag_elektronik.pptx
Modified:
    poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFImageRenderer.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFImageRenderer.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFImageRenderer.java?rev=1674952&r1=1674951&r2=1674952&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFImageRenderer.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFImageRenderer.java Mon Apr
20 18:10:43 2015
@@ -99,6 +99,10 @@ public class XSLFImageRenderer {
         } catch (Exception e) {
             return false;
         }
+        
+        if(img == null) {
+        	return false;
+        }
 
         int iw = img.getWidth();
 		int ih = img.getHeight();

Added: poi/trunk/test-data/slideshow/at.ecodesign.www_downloads_Vertiefungsvortrag_elektronik.pptx
URL: http://svn.apache.org/viewvc/poi/trunk/test-data/slideshow/at.ecodesign.www_downloads_Vertiefungsvortrag_elektronik.pptx?rev=1674952&view=auto
==============================================================================
Binary files poi/trunk/test-data/slideshow/at.ecodesign.www_downloads_Vertiefungsvortrag_elektronik.pptx
(added) and poi/trunk/test-data/slideshow/at.ecodesign.www_downloads_Vertiefungsvortrag_elektronik.pptx
Mon Apr 20 18:10:43 2015 differ



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message