Fix: thread safety issue during exiting the game (#9380)
_exit_game is read by the draw-thread to know when to exit, but
most of the time written by the game-thread.
(cherry picked from commit c12a152ec9)
This commit is contained in:
committed by
Jonathan G Rennison
parent
573ab48e9c
commit
441ff7e436
@@ -15,12 +15,14 @@
|
||||
#include "../thread.h"
|
||||
#include "null_v.h"
|
||||
|
||||
#include <atomic>
|
||||
|
||||
#include "../safeguards.h"
|
||||
|
||||
/** Factory for the null video driver. */
|
||||
static FVideoDriver_Null iFVideoDriver_Null;
|
||||
|
||||
extern bool _exit_game;
|
||||
extern std::atomic<bool> _exit_game;
|
||||
|
||||
const char *VideoDriver_Null::Start(const StringList &parm)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user