add null check in XLSFPictureShape

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1849069 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2018-12-17 09:17:29 +00:00
parent 9f7520e86f
commit bb7ffebe0f
1 changed files with 15 additions and 15 deletions

View File

@ -265,6 +265,7 @@ public class XSLFPictureShape extends XSLFSimpleShape
public XSLFPictureData getSvgImage() {
CTBlip blip = getBlip();
if (blip != null) {
CTOfficeArtExtensionList extLst = blip.getExtLst();
if (extLst == null) {
return null;
@ -282,11 +283,10 @@ public class XSLFPictureShape extends XSLFSimpleShape
cur.dispose();
}
}
}
return null;
}
/**
* Convienence method for adding SVG images, which generates the preview image
* @param sheet the sheet to add