]> source.dussan.org Git - poi.git/commitdiff
try to fix NPE in tests
authorPJ Fanning <fanningpj@apache.org>
Sun, 21 Jul 2019 08:39:56 +0000 (08:39 +0000)
committerPJ Fanning <fanningpj@apache.org>
Sun, 21 Jul 2019 08:39:56 +0000 (08:39 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1863516 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/sl/draw/BitmapImageRenderer.java

index 140fc777f21acbbb50c114279830dd637e45dbef..3643b976c09115cda6b5f267d6fd1c4c70714332 100644 (file)
@@ -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);