1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:07:35 +00:00

Hearts: Fix crash when starting an animation when there already is one

This ensures that the preceding animation is stopped first.
This commit is contained in:
Gunnar Beutner 2021-05-22 08:45:25 +02:00 committed by Linus Groh
parent 630430379e
commit 0dd22c4e23

View file

@ -121,6 +121,8 @@ void Game::setup()
void Game::start_animation(NonnullRefPtrVector<Card> cards, Gfx::IntPoint const& end, Function<void()> did_finish_callback, int initial_delay_ms, int steps)
{
stop_animation();
m_animation_end = end;
m_animation_current_step = 0;
m_animation_steps = steps;