diff --git a/PKHeX.Drawing/ImageUtil.cs b/PKHeX.Drawing/ImageUtil.cs index f87b299da..e39a162aa 100644 --- a/PKHeX.Drawing/ImageUtil.cs +++ b/PKHeX.Drawing/ImageUtil.cs @@ -16,10 +16,8 @@ public static Bitmap LayerImage(Image baseLayer, Image overLayer, int x, int y, return LayerImage(baseLayer, overLayer, x, y); } - public static Bitmap LayerImage(Image? baseLayer, Image overLayer, int x, int y) + public static Bitmap LayerImage(Image baseLayer, Image overLayer, int x, int y) { - if (baseLayer is null) - return (Bitmap)overLayer; Bitmap img = new Bitmap(baseLayer); using Graphics gr = Graphics.FromImage(img); gr.DrawImage(overLayer, x, y, overLayer.Width, overLayer.Height); diff --git a/PKHeX.WinForms/Controls/SAV Editor/BitmapAnimator.cs b/PKHeX.WinForms/Controls/SAV Editor/BitmapAnimator.cs index 02cdc5edd..8cd166cd9 100644 --- a/PKHeX.WinForms/Controls/SAV Editor/BitmapAnimator.cs +++ b/PKHeX.WinForms/Controls/SAV Editor/BitmapAnimator.cs @@ -108,7 +108,8 @@ private Image GetFrame(int frameIndex) frame = ImageUtil.GetBitmap(frameData, imgWidth, imgHeight); if (ExtraLayer != null) frame = ImageUtil.LayerImage(frame, ExtraLayer, 0, 0); - frame = ImageUtil.LayerImage(OriginalBackground, frame, 0, 0); + if (OriginalBackground != null) + frame = ImageUtil.LayerImage(OriginalBackground, frame, 0, 0); return GlowCache[frameIndex] = frame; }