Avoid crash if model is missing.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3251 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
85bff45173
commit
ac00d6e1ea
@ -133,7 +133,12 @@ void PowerupManager::LoadNode(const lisp::Lisp* lisp, int collectType )
|
||||
m_all_meshes[collectType] = 0;
|
||||
m_all_extends[collectType] = btVector3(0.0f,0.0f,0.0f);
|
||||
}
|
||||
|
||||
if(!m_all_meshes[collectType])
|
||||
{
|
||||
std::ostringstream o;
|
||||
o<<"Can't load model '"<<sModel<<"' for '"<<sName<<"', aborting.";
|
||||
throw std::runtime_error(o.str());
|
||||
}
|
||||
// Load special attributes for certain powerups
|
||||
switch (collectType) {
|
||||
case POWERUP_BOWLING:
|
||||
|
Loading…
Reference in New Issue
Block a user