From: Dominik Stadler Date: Mon, 20 Apr 2015 18:10:43 +0000 (+0000) Subject: Avoid NullPointerException if an image cannot be read X-Git-Tag: REL_3_12_FINAL~52 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1201332d4823845191dff36a170e4c66ee4a4099;p=poi.git Avoid NullPointerException if an image cannot be read git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1674952 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFImageRenderer.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFImageRenderer.java index 6e2633515a..7153bc86a8 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFImageRenderer.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFImageRenderer.java @@ -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(); diff --git a/test-data/slideshow/at.ecodesign.www_downloads_Vertiefungsvortrag_elektronik.pptx b/test-data/slideshow/at.ecodesign.www_downloads_Vertiefungsvortrag_elektronik.pptx new file mode 100644 index 0000000000..057886216f Binary files /dev/null and b/test-data/slideshow/at.ecodesign.www_downloads_Vertiefungsvortrag_elektronik.pptx differ