From: Dominik Stadler Date: Mon, 20 Apr 2015 18:26:39 +0000 (+0000) Subject: Avoid possible NullPointerException seen with some powerpoint files X-Git-Tag: REL_3_12_FINAL~50 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=894c74386e2d40b29b1c6af6e45890d149ed2e5e;p=poi.git Avoid possible NullPointerException seen with some powerpoint files git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1674958 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/RenderableShape.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/RenderableShape.java index 053ccd491d..e3804413ac 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/RenderableShape.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/RenderableShape.java @@ -576,7 +576,7 @@ class RenderableShape { public Guide getAdjustValue(String name) { CTPresetGeometry2D prst = _shape.getSpPr().getPrstGeom(); - if (prst.isSetAvLst()) { + if (prst != null && prst.isSetAvLst()) { for (CTGeomGuide g : prst.getAvLst().getGdArray()) { if (g.getName().equals(name)) { return new Guide(g); diff --git a/test-data/slideshow/ae.ac.uaeu.faculty_nafaachbili_GeomLec1.pptx b/test-data/slideshow/ae.ac.uaeu.faculty_nafaachbili_GeomLec1.pptx new file mode 100644 index 0000000000..ca9d7919c4 Binary files /dev/null and b/test-data/slideshow/ae.ac.uaeu.faculty_nafaachbili_GeomLec1.pptx differ