diff --git a/rpcs3/Emu/IdManager.h b/rpcs3/Emu/IdManager.h index 6fadac64f8..b38f229790 100644 --- a/rpcs3/Emu/IdManager.h +++ b/rpcs3/Emu/IdManager.h @@ -841,13 +841,20 @@ public: return ptr; } + // Unsafe version of check(), can be used in some cases + template + static inline T* check_unlocked() + { + return static_cast(g_vec[get_type()].second.get()); + } + // Check whether the object exists template static inline T* check() { reader_lock lock(id_manager::g_mutex); - return static_cast(g_vec[get_type()].second.get()); + return check_unlocked(); } // Get the object (returns nullptr if it doesn't exist)