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:
parent
f3e4a30c9c
commit
9d09e69b69
@ -970,6 +970,8 @@ void RaceResultGUI::displayHighScores()
|
|||||||
const std::string &icon_path = prop->getAbsoluteIconFile();
|
const std::string &icon_path = prop->getAbsoluteIconFile();
|
||||||
video::ITexture* kart_icon_texture = irr_driver->getTexture( icon_path );
|
video::ITexture* kart_icon_texture = irr_driver->getTexture( icon_path );
|
||||||
|
|
||||||
|
if (kart_icon_texture != NULL)
|
||||||
|
{
|
||||||
core::recti source_rect(core::vector2di(0,0),
|
core::recti source_rect(core::vector2di(0,0),
|
||||||
kart_icon_texture->getSize());
|
kart_icon_texture->getSize());
|
||||||
|
|
||||||
@ -983,6 +985,7 @@ void RaceResultGUI::displayHighScores()
|
|||||||
|
|
||||||
current_x += m_width_icon + m_width_column_space;
|
current_x += m_width_icon + m_width_column_space;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// draw the player name
|
// draw the player name
|
||||||
GUIEngine::getSmallFont()->draw(player_name.c_str(),
|
GUIEngine::getSmallFont()->draw(player_name.c_str(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user