From 5b40d7902a8c5d31465ad67cf8710d9f62b0ead9 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Tue, 3 Jun 2025 19:06:15 +1000 Subject: [PATCH] System: Shut down GPU backend before other components Prevents a rare crash on shutdown if OSD stats were enabled. --- src/core/system.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/system.cpp b/src/core/system.cpp index 267a7c092..0e672c991 100644 --- a/src/core/system.cpp +++ b/src/core/system.cpp @@ -1960,6 +1960,8 @@ void System::DestroySystem() FreeMemoryStateStorage(true, true, false); + GPUThread::DestroyGPUBackend(); + Cheats::UnloadAll(); PCDrv::Shutdown(); SIO::Shutdown(); @@ -1978,7 +1980,6 @@ void System::DestroySystem() TimingEvents::Shutdown(); Achievements::OnSystemDestroyed(); ClearRunningGame(); - GPUThread::DestroyGPUBackend(); s_state.taints = 0; s_state.bios_hash = {};