diff --git a/Ryujinx.Profiler/InternalProfile.cs b/Ryujinx.Profiler/InternalProfile.cs index 75f9581e54..1dcc4ed462 100644 --- a/Ryujinx.Profiler/InternalProfile.cs +++ b/Ryujinx.Profiler/InternalProfile.cs @@ -150,10 +150,11 @@ namespace Ryujinx.Profiler { _preserve = PerformanceCounter.ElapsedTicks; - // Make sure to clear queue - lock (_timerQueueClearLock) + // Skip clearing queue if already clearing + if (Monitor.TryEnter(_timerQueueClearLock)) { ClearTimerQueue(); + Monitor.Exit(_timerQueueClearLock); } return Timers;