Fix assertion failed introduced in #4723 (#4728)

This commit is contained in:
Kuba 2022-01-28 02:56:00 +01:00 committed by GitHub
parent 6e347ae517
commit 65afb72c98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -909,7 +909,8 @@ void RaceResultGUI::unload()
ri->m_finish_time_string += StringUtils::toWString(ranking_change);
}
}
ri->m_laps = World::getWorld()->getFinishedLapsOfKart(ri->m_kart_id);
ri->m_laps = World::getWorld()->raceHasLaps() ?
World::getWorld()->getFinishedLapsOfKart(ri->m_kart_id) : 0;
core::dimension2du rect =
m_font->getDimension(ri->m_kart_name.c_str());