From 882e949f8035d4968e66fd52230d839b365daf48 Mon Sep 17 00:00:00 2001 From: kd-11 Date: Tue, 24 Oct 2017 17:59:03 +0300 Subject: [PATCH] vk: Fix for infinite hanging in the access violation handler --- rpcs3/Emu/RSX/VK/VKGSRender.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/RSX/VK/VKGSRender.cpp b/rpcs3/Emu/RSX/VK/VKGSRender.cpp index 9b9c70d1f3..71c0a39325 100644 --- a/rpcs3/Emu/RSX/VK/VKGSRender.cpp +++ b/rpcs3/Emu/RSX/VK/VKGSRender.cpp @@ -739,8 +739,11 @@ VKGSRender::~VKGSRender() bool VKGSRender::on_access_violation(u32 address, bool is_writing) { - std::lock_guard lock(m_secondary_cb_guard); - auto result = m_texture_cache.invalidate_address(address, is_writing, false, *m_device, m_secondary_command_buffer, m_memory_type_mapping, m_swap_chain->get_present_queue()); + std::pair> result; + { + std::lock_guard lock(m_secondary_cb_guard); + result = std::move(m_texture_cache.invalidate_address(address, is_writing, false, *m_device, m_secondary_command_buffer, m_memory_type_mapping, m_swap_chain->get_present_queue())); + } if (!result.first) return false;