Skip to content

Commit

Permalink
- Fixing exception during automatic disabling of Persistent Timer Ove…
Browse files Browse the repository at this point in the history
…rlay Widgets while editing for the first time
  • Loading branch information
Matthew Olivo committed Oct 17, 2024
1 parent a22908f commit 471999c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion MixItUp.Base/Model/Overlay/OverlayPersistentTimerV3Model.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -216,7 +217,11 @@ private async Task BackgroundTimer(CancellationToken cancellationToken)
await ServiceManager.Get<CommandService>().Queue(this.TimerCompletedCommandID);
if (this.DisableOnCompletion)
{
await ServiceManager.Get<OverlayV3Service>().GetWidget(this.ID).Disable();
OverlayWidgetV3Model widget = ServiceManager.Get<OverlayV3Service>().GetWidget(this.ID);
if (widget != null)
{
await widget.Disable();
}
}
}
}
Expand Down

0 comments on commit 471999c

Please sign in to comment.