From 87d24d3259bd8d97345006a2ccb6b42c1bf30efb Mon Sep 17 00:00:00 2001 From: Stenzek Date: Mon, 18 Dec 2023 20:39:19 +1000 Subject: [PATCH] System: Fix crash on emptying rewind buffer --- src/core/system.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/system.cpp b/src/core/system.cpp index 3762ae6bc..8a40d33e8 100644 --- a/src/core/system.cpp +++ b/src/core/system.cpp @@ -3958,7 +3958,7 @@ bool System::LoadRewindState(u32 skip_saves /*= 0*/, bool consume_state /*=true { while (skip_saves > 0 && !s_rewind_states.empty()) { - g_gpu_device->RecycleTexture(std::move(s_rewind_states.front().vram_texture)); + g_gpu_device->RecycleTexture(std::move(s_rewind_states.back().vram_texture)); s_rewind_states.pop_back(); skip_saves--; }