Skip to content

Commit

Permalink
fix nil ptr crash when switching to favorite songs view
Browse files Browse the repository at this point in the history
  • Loading branch information
dweymouth committed Feb 18, 2024
1 parent 268860b commit 74a8aea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/widgets/tracklist.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,9 @@ func (t *Tracklist) SetTracks(trs []*mediaprovider.Track) {
func (t *Tracklist) _setTracks(trs []*mediaprovider.Track) {
t.tracksMutex.Lock()
defer t.tracksMutex.Unlock()
t.list.ClearItemForIDMap()
if t.list != nil {
t.list.ClearItemForIDMap()
}
t.tracksOrigOrder = toTrackModels(trs)
t.doSortTracks()
}
Expand Down

0 comments on commit 74a8aea

Please sign in to comment.