diff --git a/src/engine/client/backend_sdl.cpp b/src/engine/client/backend_sdl.cpp index 29e762ef7..34e981514 100644 --- a/src/engine/client/backend_sdl.cpp +++ b/src/engine/client/backend_sdl.cpp @@ -95,6 +95,7 @@ CGraphicsBackend_Threaded::CGraphicsBackend_Threaded() { m_pBuffer = nullptr; m_pProcessor = nullptr; + m_Shutdown = true; m_BufferInProcess.store(false, std::memory_order_relaxed); } diff --git a/src/engine/client/backend_sdl.h b/src/engine/client/backend_sdl.h index c1750128a..cb4e80003 100644 --- a/src/engine/client/backend_sdl.h +++ b/src/engine/client/backend_sdl.h @@ -72,7 +72,7 @@ private: std::mutex m_BufferSwapMutex; std::condition_variable m_BufferSwapCond; CCommandBuffer *m_pBuffer; - std::atomic_bool m_Shutdown = true; + std::atomic_bool m_Shutdown; bool m_Started = false; std::atomic_bool m_BufferInProcess; void *m_Thread;