Guard against missing active track (#2996)

Co-authored-by: Deluan Quintão <deluan@navidrome.org>
This commit is contained in:
Matthias Schmidt 2024-05-08 01:22:39 +02:00 committed by GitHub
parent b3d70e9264
commit ff8dca5abe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -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.")
}