1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 10:42:36 +01:00

Attempt to fix #9316

This commit is contained in:
Nekotekina 2020-11-22 12:57:50 +03:00
parent 6cf50f8f6c
commit f85c8584b0

View File

@ -329,11 +329,17 @@ namespace cpu_counter
void remove(cpu_thread* _this) noexcept
{
// Return if not registered
const u32 slot = s_tls_thread_slot;
if (slot == umax)
{
return;
}
// Unregister and wait if necessary
verify(HERE), _this->state & cpu_flag::wait;
u32 slot = s_tls_thread_slot;
if (slot >= std::size(s_cpu_list))
{
sys_log.fatal("Index out of bounds (%u)." HERE, slot);