From bac9bf93bcb2bf9d0007a64963d354b5983efb45 Mon Sep 17 00:00:00 2001 From: Matthias Urlichs Date: Wed, 5 Feb 2025 06:40:50 +0100 Subject: [PATCH] Codefix: Null video driver: take the game lock The game loop must run with the game lock held. --- src/video/null_v.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/video/null_v.cpp b/src/video/null_v.cpp index 787bb64feb..0ca0057762 100644 --- a/src/video/null_v.cpp +++ b/src/video/null_v.cpp @@ -51,7 +51,10 @@ void VideoDriver_Null::MainLoop() uint i; for (i = 0; i < this->ticks && ! _exit_game; i++) { - ::GameLoop(); + { + std::lock_guard lock(this->game_state_mutex); + ::GameLoop(); + } ::InputLoop(); ::UpdateWindows(); }