Make sure that next track is not higher than tracks size.
This commit is contained in:
parent
85800f48e6
commit
2b6ef130da
@ -136,7 +136,9 @@ void GPInfoScreen::beforeAddingWidget()
|
||||
m_gp.getId(),
|
||||
race_manager->getNumLocalPlayers());
|
||||
|
||||
bool continue_visible = saved_gp && saved_gp->getNextTrack() > 0;
|
||||
int tracks = m_gp.getTrackNames().size();
|
||||
bool continue_visible = saved_gp && saved_gp->getNextTrack() > 0 &&
|
||||
saved_gp->getNextTrack() < tracks;
|
||||
|
||||
RibbonWidget* ribbonButtons = getWidget<RibbonWidget>("buttons");
|
||||
int id_continue_button = ribbonButtons->findItemNamed("continue");
|
||||
|
Loading…
Reference in New Issue
Block a user