Merge pull request #7563 from delroth/crashfix

SystemTimers: fix a 1-in-1000 crash happening in throttler performance reporting
This commit is contained in:
Pierre Bourdon 2018-11-10 20:52:57 +01:00 committed by GitHub
commit f1c41c9a62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -253,7 +253,7 @@ double GetEstimatedEmulationPerformance()
u64 ts_now, ts_before; // In microseconds
{
std::lock_guard<std::mutex> lk(s_emu_to_real_time_mutex);
size_t index_now = s_emu_to_real_time_index == 0 ? s_emu_to_real_time_ring_buffer.size() :
size_t index_now = s_emu_to_real_time_index == 0 ? s_emu_to_real_time_ring_buffer.size() - 1 :
s_emu_to_real_time_index - 1;
size_t index_before = s_emu_to_real_time_index;