From b7247a79d14b95d3a019b63a8c61c5c81a17facb Mon Sep 17 00:00:00 2001 From: "Sean E. Russell" Date: Wed, 15 May 2024 10:00:00 -0500 Subject: [PATCH] Fixes index panic on refresh operation. --- page_browser.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/page_browser.go b/page_browser.go index 6717b06..25c80b0 100644 --- a/page_browser.go +++ b/page_browser.go @@ -136,7 +136,9 @@ func (ui *Ui) createBrowserPage(indexes *[]subsonic.SubsonicIndex) *BrowserPage }) browserPage.artistList.SetChangedFunc(func(index int, _ string, _ string, _ rune) { - browserPage.handleEntitySelected(browserPage.artistIdList[index]) + if index < len(browserPage.artistIdList) { + browserPage.handleEntitySelected(browserPage.artistIdList[index]) + } }) // "add to playlist" modal