try to fix NPE in tests

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1863516 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2019-07-21 08:39:56 +00:00
parent cf1eb05304
commit 21ed5240e7
1 changed files with 3 additions and 0 deletions

View 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);