From 78b13eeedf8d5a1b26de3e7fcc067f90f58ec2e7 Mon Sep 17 00:00:00 2001 From: Benau Date: Sun, 26 Jul 2020 12:36:42 +0800 Subject: [PATCH] Fix possible empty icon in result screen for addon kart online --- src/states_screens/race_result_gui.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/states_screens/race_result_gui.cpp b/src/states_screens/race_result_gui.cpp index aecb743d3..0c870930e 100644 --- a/src/states_screens/race_result_gui.cpp +++ b/src/states_screens/race_result_gui.cpp @@ -1448,6 +1448,9 @@ void RaceResultGUI::displayCTFResults() video::SColor(255, 255, 0, 0) : color), true, false); irr::video::ITexture* scorer_icon = NULL; const KartProperties* kp = kart_properties_manager->getKart(scorers.at(i).m_kart); + // For addon kart online + if (!kp) + kp = kart_properties_manager->getKart("tux"); if (kp) scorer_icon = kp->getIconMaterial()->getTexture(); if (scorer_icon) @@ -1506,6 +1509,9 @@ void RaceResultGUI::displayCTFResults() video::SColor(255, 255, 0, 0) : color), true, false); irr::video::ITexture* scorer_icon = NULL; const KartProperties* kp = kart_properties_manager->getKart(scorers.at(i).m_kart); + // For addon kart online + if (!kp) + kp = kart_properties_manager->getKart("tux"); if (kp) scorer_icon = kp->getIconMaterial()->getTexture(); if (scorer_icon)