diff --git a/obs-powershell.ps.psm1 b/obs-powershell.ps.psm1 index 1354f7f21..e1b8734ea 100644 --- a/obs-powershell.ps.psm1 +++ b/obs-powershell.ps.psm1 @@ -3,6 +3,10 @@ $CommandsPath = (Join-Path $PSScriptRoot "Commands") $MyInvocation.MyCommand.ScriptBlock.Module.OnRemove = { Get-OBSEffect | Stop-OBSEffect + if (${obs-powershell}.Beat.Timer) { + ${obs-powershell}.Beat.Timer.Stop() + Get-EventSubscriber | Where-Object SourceObject -eq ${obs-powershell}.Beat.Timer | Unregister-Event + } Disconnect-OBS }