Skip to content

Commit

Permalink
Guard against missing active track (#2996)
Browse files Browse the repository at this point in the history
Co-authored-by: Deluan Quintão <deluan@navidrome.org>
  • Loading branch information
ms140569 and deluan authored May 7, 2024
1 parent b3d70e9 commit ff8dca5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/playback/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
}
Expand Down

0 comments on commit ff8dca5

Please sign in to comment.