mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-23 15:20:33 +03:00
fixed a NPD (Nil Pointer Dereference)
This commit is contained in:
parent
c580a4199e
commit
638f328330
@ -59,6 +59,9 @@ func (r *nowPlayingRepository) Head(playerId int) (*engine.NowPlayingInfo, error
|
||||
// TODO Will not work for multiple players
|
||||
func (r *nowPlayingRepository) GetAll() ([]*engine.NowPlayingInfo, error) {
|
||||
np, err := r.Head(1)
|
||||
if np == nil || err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return []*engine.NowPlayingInfo{np}, err
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user