From cc79e88702b01bf68dafe38bcf76c89ba23545b0 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Fri, 5 Feb 2021 16:15:11 -0500 Subject: [PATCH] fix: Don't throw an ObjectDisposed exception when attempting to stop a disposed timer --- ICD.Common.Utils/Timers/SafeTimer.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ICD.Common.Utils/Timers/SafeTimer.cs b/ICD.Common.Utils/Timers/SafeTimer.cs index 3bc3db2..1ed80bd 100644 --- a/ICD.Common.Utils/Timers/SafeTimer.cs +++ b/ICD.Common.Utils/Timers/SafeTimer.cs @@ -93,6 +93,9 @@ namespace ICD.Common.Utils.Timers /// public void Stop() { + if (IsDisposed) + return; + #if SIMPLSHARP m_Timer.Stop(); #else