diff options
author | PJ Fanning <fanningpj@apache.org> | 2019-07-21 08:39:56 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2019-07-21 08:39:56 +0000 |
commit | 21ed5240e7a5db6b2896987a4c172dcf4a1951c1 (patch) | |
tree | 5900a30cc17b7c9308ef8f0cc75ca54a40aa297c /src/java/org | |
parent | cf1eb05304734c8d20b21dd4d138edd6df6533e4 (diff) | |
download | poi-21ed5240e7a5db6b2896987a4c172dcf4a1951c1.tar.gz poi-21ed5240e7a5db6b2896987a4c172dcf4a1951c1.zip |
try to fix NPE in tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1863516 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r-- | src/java/org/apache/poi/sl/draw/BitmapImageRenderer.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/java/org/apache/poi/sl/draw/BitmapImageRenderer.java b/src/java/org/apache/poi/sl/draw/BitmapImageRenderer.java index 140fc777f2..3643b976c0 100644 --- a/src/java/org/apache/poi/sl/draw/BitmapImageRenderer.java +++ b/src/java/org/apache/poi/sl/draw/BitmapImageRenderer.java @@ -239,6 +239,9 @@ public class BitmapImageRenderer implements ImageRenderer { @Override public BufferedImage getImage(Dimension2D dim) { + if (img == null) { + return img; + } double w_old = img.getWidth(); double h_old = img.getHeight(); BufferedImage scaled = new BufferedImage((int)w_old, (int)h_old, BufferedImage.TYPE_INT_ARGB); |