mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Merge pull request #2002 from draxdyn/getwizardsimage_npe
Fix NPE in getWizardsCard
This commit is contained in:
commit
8c017fe3d2
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue