From 65afb72c98c27b6aacd51e416f4d7e181cbb7dca Mon Sep 17 00:00:00 2001 From: Kuba Date: Fri, 28 Jan 2022 02:56:00 +0100 Subject: [PATCH] Fix assertion failed introduced in #4723 (#4728) --- src/states_screens/race_result_gui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/states_screens/race_result_gui.cpp b/src/states_screens/race_result_gui.cpp index 5ec146ed3..b78d8c18e 100644 --- a/src/states_screens/race_result_gui.cpp +++ b/src/states_screens/race_result_gui.cpp @@ -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());