fixed potential crash in previous commit
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2702 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
f235baafed
commit
9de5258867
@ -572,7 +572,8 @@ void Kart::update(float dt)
|
||||
if (getHoT()==Track::NOHIT) // kart falling off the track
|
||||
{
|
||||
// let kart fall a bit before rescuing
|
||||
if( abs( getXYZ().getZ() - RaceManager::getTrack()->m_left_driveline[0].getZ() ) > 17)
|
||||
if( RaceManager::getTrack()->m_left_driveline.size() > 0 &&
|
||||
abs( getXYZ().getZ() - RaceManager::getTrack()->m_left_driveline[0].getZ() ) > 17)
|
||||
forceRescue();
|
||||
}
|
||||
else if(material)
|
||||
|
Loading…
Reference in New Issue
Block a user