From ff8dca5abe3962f40dbdce10ca12716f40d74acd Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Wed, 8 May 2024 01:22:39 +0200 Subject: [PATCH] Guard against missing active track (#2996) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Deluan Quintão --- core/playback/device.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/playback/device.go b/core/playback/device.go index 1edb37636..82e22334b 100644 --- a/core/playback/device.go +++ b/core/playback/device.go @@ -269,7 +269,9 @@ func (pd *playbackDevice) trackSwitcherGoroutine() { if err != nil { log.Error("Error switching track", err) } - pd.ActiveTrack.Unpause() + if pd.ActiveTrack != nil { + pd.ActiveTrack.Unpause() + } } else { log.Debug("There is no song left in the playlist. Finish.") }