Skip to content

Fix crash when there're no artists avaliable#388

Merged
Rigellute merged 1 commit into
Rigellute:masterfrom
slumber:master
Apr 10, 2020
Merged

Fix crash when there're no artists avaliable#388
Rigellute merged 1 commit into
Rigellute:masterfrom
slumber:master

Conversation

@slumber
Copy link
Copy Markdown
Contributor

@slumber slumber commented Apr 9, 2020

Simple check for an out of bounds panic.

I don't really use Spotify, but I was curious to try your application, so after creating new account I've encountered this segfault.

Simple check for an out of bounds panic.
Comment thread src/handlers/artists.rs
let artist = &artists[app.artists_list_index];
app.get_artist(artist.id.clone(), artist.name.clone());
app.push_navigation_stack(RouteId::Artist, ActiveBlock::ArtistBlock);
if !artists.is_empty() {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @slumber 👍

@Rigellute Rigellute merged commit 35e73c9 into Rigellute:master Apr 10, 2020
@Rigellute
Copy link
Copy Markdown
Owner

@all-contributors please add @slumber for code

@allcontributors
Copy link
Copy Markdown
Contributor

@Rigellute

I've put up a pull request to add @slumber! 🎉

nighi pushed a commit to nighi/spotify-tui that referenced this pull request Jul 11, 2025
Fix crash when there're no artists avaliable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants