Guard against missing active track (#2996)
Co-authored-by: Deluan Quintão <deluan@navidrome.org>
This commit is contained in:
@@ -269,7 +269,9 @@ func (pd *playbackDevice) trackSwitcherGoroutine() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Error switching track", err)
|
log.Error("Error switching track", err)
|
||||||
}
|
}
|
||||||
pd.ActiveTrack.Unpause()
|
if pd.ActiveTrack != nil {
|
||||||
|
pd.ActiveTrack.Unpause()
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
log.Debug("There is no song left in the playlist. Finish.")
|
log.Debug("There is no song left in the playlist. Finish.")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user