diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index 0b1f208fd0..9566939b62 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -1971,6 +1971,9 @@ bool Emulator::Quit(bool force_quit) m_force_boot = false; Emu.Stop(); + // Deinitialize object manager to prevent any hanging objects at program exit + *g_fxo = {}; + return GetCallbacks().exit(force_quit); } diff --git a/rpcs3/util/fixed_typemap.hpp b/rpcs3/util/fixed_typemap.hpp index 65b90f3161..c854d5cf84 100644 --- a/rpcs3/util/fixed_typemap.hpp +++ b/rpcs3/util/fixed_typemap.hpp @@ -101,6 +101,7 @@ namespace stx std::swap(m_list, x.m_list); std::swap(m_order, x.m_order); std::swap(m_init_count, x.m_init_count); + return *this; } ~manual_fixed_typemap()