From 678a45cc9a19493826099ceb123331d52442507b Mon Sep 17 00:00:00 2001 From: auria Date: Fri, 3 Aug 2012 22:35:46 +0000 Subject: [PATCH] Fix potential crashes git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11458 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/karts/controller/ai_base_controller.cpp | 2 +- src/tracks/track_object.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/karts/controller/ai_base_controller.cpp b/src/karts/controller/ai_base_controller.cpp index 0955fdcb6..50fa169c5 100644 --- a/src/karts/controller/ai_base_controller.cpp +++ b/src/karts/controller/ai_base_controller.cpp @@ -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); diff --git a/src/tracks/track_object.cpp b/src/tracks/track_object.cpp index 32309a954..3fef4d723 100644 --- a/src/tracks/track_object.cpp +++ b/src/tracks/track_object.cpp @@ -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() // ----------------------------------------------------------------------------