Fix potential crashes

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11458 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2012-08-03 22:35:46 +00:00
parent fd6f2aa617
commit 678a45cc9a
2 changed files with 3 additions and 1 deletions

View File

@ -201,7 +201,7 @@ void AIBaseController::crashed(const Material *m)
const unsigned int NUM_COLLISION = 3;
const float COLLISION_TIME = 1.5f;
float time = m_world->getTime();
float time = World::getWorld()->getTime();
if(m_collision_times.size()==0)
{
m_collision_times.push_back(time);

View File

@ -273,6 +273,7 @@ TrackObject::TrackObject(const core::vector3df& pos, const core::vector3df& hpr,
m_enabled = true;
m_is_looped = false;
m_sound = NULL;
m_emitter = NULL;
// Some animated objects (billboards, sound emitters) don't use this scene node
if (model_name == "")
@ -343,6 +344,7 @@ TrackObject::TrackObject()
m_node = NULL;
m_mesh = NULL;
m_sound = NULL;
m_emitter = NULL;
} // TrackObject()
// ----------------------------------------------------------------------------