From d6f623ecfb4da3148fb2aa2079ec8ed117fd8303 Mon Sep 17 00:00:00 2001 From: Kurt Date: Mon, 23 Jul 2018 18:31:01 -0700 Subject: [PATCH] Fix #2072 Just a guess; don't dispose of the bitmaps suspected race where two beginhovers happen and one cancels the other --- PKHeX.WinForms/Controls/SAV Editor/BitmapAnimator.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/PKHeX.WinForms/Controls/SAV Editor/BitmapAnimator.cs b/PKHeX.WinForms/Controls/SAV Editor/BitmapAnimator.cs index 6d963ea94..b7135db86 100644 --- a/PKHeX.WinForms/Controls/SAV Editor/BitmapAnimator.cs +++ b/PKHeX.WinForms/Controls/SAV Editor/BitmapAnimator.cs @@ -15,9 +15,12 @@ namespace PKHeX.WinForms.Controls Elapsed += TimerElapsed; } - private readonly Bitmap GlowBase; - private readonly Bitmap ExtraLayer; + private Bitmap GlowBase; + private Bitmap ExtraLayer; private Bitmap[] GlowCache; + public Image OriginalBackground; + + private PictureBox pb; private int GlowInterval; private int GlowCounter; @@ -38,11 +41,10 @@ namespace PKHeX.WinForms.Controls { Enabled = false; pb.BackgroundImage = OriginalBackground; - GlowBase.Dispose(); + GlowBase = ExtraLayer = null; + OriginalBackground = null; } - private PictureBox pb; - public Image OriginalBackground; public void Start(PictureBox pbox, Image original) { pb = pbox;