fix NPE in getWizardsCard

This commit is contained in:
draxdyn 2016-06-08 15:56:46 +02:00
parent a9744b2d04
commit 54a7be59d0

View file

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