Just a guess; don't dispose of the bitmaps
suspected race where two beginhovers happen and one cancels the other
This commit is contained in:
Kurt
2018-07-23 18:31:01 -07:00
parent 68d251f89c
commit d6f623ecfb

View File

@@ -15,9 +15,12 @@ public BitmapAnimator(Bitmap baseImage, Bitmap extraLayer = null)
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 @@ private void StopTimer()
{
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;