From 3dd6969db1df9e0a32d3cf0742e8a0355abf2dec Mon Sep 17 00:00:00 2001 From: Kurt Date: Wed, 6 Aug 2014 17:10:01 -0700 Subject: [PATCH] Fix for null images --- Misc/Util.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Misc/Util.cs b/Misc/Util.cs index bd0c00938..a773efe7c 100644 --- a/Misc/Util.cs +++ b/Misc/Util.cs @@ -13,6 +13,7 @@ namespace PKHeX { Bitmap overlayImage = (Bitmap)overLayer; Bitmap newImage = (Bitmap)baseLayer; + if (baseLayer == null) return overLayer; for (int i = 0; i < (overlayImage.Width * overlayImage.Height); i++) { Color newColor = overlayImage.GetPixel(i % (overlayImage.Width), i / (overlayImage.Width));