From 55443563e6be7af5d1fe4e2d84e8bae003c4d16b Mon Sep 17 00:00:00 2001 From: vladislavbelov Date: Sun, 4 Dec 2022 14:54:24 +0000 Subject: [PATCH] Fixes calling SDL functions in CVideoMode after SDL_Quit. CVideoMode::Shutdown was introduced in 97019c3a5a without any SDL calls in it. But the one was added in d62e3729d5. Differential Revision: https://code.wildfiregames.com/D4836 This was SVN commit r27268. --- source/ps/GameSetup/GameSetup.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/ps/GameSetup/GameSetup.cpp b/source/ps/GameSetup/GameSetup.cpp index 43c49f35e6..c7cc396490 100644 --- a/source/ps/GameSetup/GameSetup.cpp +++ b/source/ps/GameSetup/GameSetup.cpp @@ -363,13 +363,13 @@ void Shutdown(int flags) g_Profiler2.ShutdownGPU(); + if (hasRenderer) + g_VideoMode.Shutdown(); + TIMER_BEGIN(L"shutdown SDL"); ShutdownSDL(); TIMER_END(L"shutdown SDL"); - if (hasRenderer) - g_VideoMode.Shutdown(); - TIMER_BEGIN(L"shutdown UserReporter"); g_UserReporter.Deinitialize(); TIMER_END(L"shutdown UserReporter");