diff --git a/MixItUp.Base/Model/Overlay/OverlayPersistentTimerV3Model.cs b/MixItUp.Base/Model/Overlay/OverlayPersistentTimerV3Model.cs index f0360fe47..e4ce7bc49 100644 --- a/MixItUp.Base/Model/Overlay/OverlayPersistentTimerV3Model.cs +++ b/MixItUp.Base/Model/Overlay/OverlayPersistentTimerV3Model.cs @@ -9,6 +9,7 @@ using System.Text.Json.Serialization; using MixItUp.Base.Util; using StreamingClient.Base.Util; +using MixItUp.Base.Model.Overlay.Widgets; namespace MixItUp.Base.Model.Overlay { @@ -216,7 +217,11 @@ private async Task BackgroundTimer(CancellationToken cancellationToken) await ServiceManager.Get().Queue(this.TimerCompletedCommandID); if (this.DisableOnCompletion) { - await ServiceManager.Get().GetWidget(this.ID).Disable(); + OverlayWidgetV3Model widget = ServiceManager.Get().GetWidget(this.ID); + if (widget != null) + { + await widget.Disable(); + } } } }