Replace assertion failure and possible crash by printing a warning and keeping going
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7213 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
93503a8451
commit
d78a1c0700
@ -133,7 +133,13 @@ void FeatureUnlockedCutScene::addUnlockedPicture(irr::video::ITexture* picture,
|
||||
float w, float h,
|
||||
irr::core::stringw msg)
|
||||
{
|
||||
assert(picture != NULL);
|
||||
if (picture == NULL)
|
||||
{
|
||||
std::cerr << "[FeatureUnlockedCutScene::addUnlockedPicture] WARNING: unlockable has no picture : "
|
||||
<< core::stringc(msg.c_str()).c_str() << "\n";
|
||||
picture = irr_driver->getTexture(file_manager->getGUIDir() + "/main_help.png");
|
||||
|
||||
}
|
||||
|
||||
m_unlocked_stuff.push_back( new UnlockedThing(picture, w, h, msg) );
|
||||
} // addUnlockedPicture
|
||||
|
Loading…
Reference in New Issue
Block a user