From 54a7be59d0db620c2874a22364850ee4eeffca54 Mon Sep 17 00:00:00 2001 From: draxdyn Date: Wed, 8 Jun 2016 15:56:46 +0200 Subject: [PATCH] fix NPE in getWizardsCard --- .../src/main/java/org/mage/plugins/card/images/ImageCache.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mage.Client/src/main/java/org/mage/plugins/card/images/ImageCache.java b/Mage.Client/src/main/java/org/mage/plugins/card/images/ImageCache.java index 86f7b6c5d0..9292cb51e4 100644 --- a/Mage.Client/src/main/java/org/mage/plugins/card/images/ImageCache.java +++ b/Mage.Client/src/main/java/org/mage/plugins/card/images/ImageCache.java @@ -184,7 +184,7 @@ public class ImageCache { } public static BufferedImage getWizardsCard(BufferedImage image) { - if (image.getWidth() == 265 && image.getHeight() == 370) { + if (image != null && image.getWidth() == 265 && image.getHeight() == 370) { BufferedImage crop = new BufferedImage(256, 360, BufferedImage.TYPE_INT_RGB); Graphics2D graphics2D = crop.createGraphics(); graphics2D.drawImage(image, 0, 0, 255, 360, 5, 5, 261, 365, null);