Fixed crash when a track has an invalid screenshot file
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5026 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
4c7a4fb85c
commit
074a1a843f
@ -100,6 +100,11 @@ TrackInfoDialog::TrackInfoDialog(const std::string& trackIdent, const irr::core:
|
||||
screenshotWidget->m_properties[PROP_ICON] = "gui/main_help.png";
|
||||
screenshotWidget->setParent(m_irrlicht_window);
|
||||
screenshotWidget->add();
|
||||
|
||||
if (screenshot == NULL)
|
||||
{
|
||||
screenshot = irr_driver->getTexture((file_manager->getDataDir() + "/gui/main_help.png").c_str());
|
||||
}
|
||||
screenshotWidget->setImage(screenshot);
|
||||
m_children.push_back(screenshotWidget);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user