From 7fc01ddc6ed4b5eaed3622eafcefdf7e44d7a64b Mon Sep 17 00:00:00 2001 From: MattNL Date: Sun, 25 Sep 2022 16:47:03 -0400 Subject: [PATCH] Fixed rare crash when playing animations --- PCK-Studio/Forms/Editor/AnimationEditor.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PCK-Studio/Forms/Editor/AnimationEditor.cs b/PCK-Studio/Forms/Editor/AnimationEditor.cs index 003931ee..e8ccd8c8 100644 --- a/PCK-Studio/Forms/Editor/AnimationEditor.cs +++ b/PCK-Studio/Forms/Editor/AnimationEditor.cs @@ -293,6 +293,8 @@ namespace PckStudio.Forms.Editor private void StartAnimationBtn_Click(object sender, EventArgs e) { + // crash fix: when pushing the play button on occasions, the animation will play twice the intended speed and crash PCK Studio after one iteration + player.Stop(); // force the player to stop before starting AnimationPlayBtn.Enabled = !(AnimationStopBtn.Enabled = !AnimationStopBtn.Enabled); if (currentAnimation.FrameCount > 1) {