Add check to not crash when a kart has a null icon

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12397 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2013-01-20 20:28:47 +00:00
parent f3e4a30c9c
commit 9d09e69b69

View File

@ -970,6 +970,8 @@ void RaceResultGUI::displayHighScores()
const std::string &icon_path = prop->getAbsoluteIconFile();
video::ITexture* kart_icon_texture = irr_driver->getTexture( icon_path );
if (kart_icon_texture != NULL)
{
core::recti source_rect(core::vector2di(0,0),
kart_icon_texture->getSize());
@ -983,6 +985,7 @@ void RaceResultGUI::displayHighScores()
current_x += m_width_icon + m_width_column_space;
}
}
// draw the player name
GUIEngine::getSmallFont()->draw(player_name.c_str(),