Avoid a crash in ghost replay screen.
It was crashing when add-on track was uninstalled. It only avoids a crash and it's not true fix, because replays list should be updated when add-ons have been installed/uninstalled.
This commit is contained in:
parent
5b9dc6895d
commit
20ffc3a693
@ -107,10 +107,14 @@ void GhostReplaySelection::loadList()
|
|||||||
(RaceManager::Difficulty)rd.m_difficulty)
|
(RaceManager::Difficulty)rd.m_difficulty)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
Track* track = track_manager->getTrack(rd.m_track_name);
|
||||||
|
|
||||||
|
if (track == NULL)
|
||||||
|
continue;
|
||||||
|
|
||||||
std::vector<GUIEngine::ListWidget::ListCell> row;
|
std::vector<GUIEngine::ListWidget::ListCell> row;
|
||||||
Track* t = track_manager->getTrack(rd.m_track_name);
|
|
||||||
row.push_back(GUIEngine::ListWidget::ListCell
|
row.push_back(GUIEngine::ListWidget::ListCell
|
||||||
(translations->fribidize(t->getName()) , -1, 3));
|
(translations->fribidize(track->getName()) , -1, 3));
|
||||||
row.push_back(GUIEngine::ListWidget::ListCell
|
row.push_back(GUIEngine::ListWidget::ListCell
|
||||||
(StringUtils::toWString(rd.m_kart_list.size()), -1, 1, true));
|
(StringUtils::toWString(rd.m_kart_list.size()), -1, 1, true));
|
||||||
row.push_back(GUIEngine::ListWidget::ListCell
|
row.push_back(GUIEngine::ListWidget::ListCell
|
||||||
|
Loading…
Reference in New Issue
Block a user