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:
hikerstk 2009-03-13 01:26:13 +00:00
parent 85bff45173
commit ac00d6e1ea

View File

@ -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: