mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-27 01:50:24 +00:00
Solitaire: Maybe fix rare crash from completing a game with TAB (#8217)
The crash happens very rarely and is hard to reproduce so it is hard to know for certain, but I am confident this fixes it. I previously delayed the start of the game-over animation by one frame, but neglected to check m_start_game_over_animation_next_frame wasn't set. This means multiple calls to start_game_over_animation() on the same frame (or rather, before the first timer_event) would each call Object::start_timer(). Now that we do check the flag, that should no longer be possible. Fixes #8122.
This commit is contained in:
parent
bd5a04fffe
commit
f2d6cac692
Notes:
sideshowbarker
2024-07-18 11:36:10 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/f2d6cac692a Pull-request: https://github.com/SerenityOS/serenity/pull/8217 Issue: https://github.com/SerenityOS/serenity/issues/8122
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ void Game::set_background_fill_enabled(bool enabled)
|
|||
|
||||
void Game::start_game_over_animation()
|
||||
{
|
||||
if (m_game_over_animation)
|
||||
if (m_game_over_animation || m_start_game_over_animation_next_frame)
|
||||
return;
|
||||
|
||||
m_last_move = {};
|
||||
|
|
Loading…
Reference in a new issue