Skip to content

Commit

Permalink
do nothing if there are no playlists to add a chart to
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Jun 25, 2017
1 parent c46dd91 commit 9f3c791
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ScreenSelectMusic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,9 @@ bool ScreenSelectMusic::Input(const InputEventPlus &input)
}
else if (bHoldingCtrl && c == 'A' && m_MusicWheel.IsSettled() && input.type == IET_FIRST_PRESS)
{
if (SONGMAN->allplaylists.empty())
return true;

SONGMAN->allplaylists[SONGMAN->activeplaylist].AddChart(GAMESTATE->m_pCurSteps[PLAYER_1]->GetChartKey());
MESSAGEMAN->Broadcast("DisplayPlaylist");
SCREENMAN->SystemMessage(ssprintf("Added chart: %s to playlist: %s", GAMESTATE->m_pCurSong->GetDisplayMainTitle().c_str(), SONGMAN->activeplaylist));
Expand Down

0 comments on commit 9f3c791

Please sign in to comment.