From d76777f76507ba4352507005e38997c9c1465d1c Mon Sep 17 00:00:00 2001 From: hikerstk Date: Wed, 15 Feb 2012 20:54:11 +0000 Subject: [PATCH] Fixed crash with end controller. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/reverse_mode@10852 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/karts/controller/end_controller.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/karts/controller/end_controller.cpp b/src/karts/controller/end_controller.cpp index 2310bf527..d1295a04b 100644 --- a/src/karts/controller/end_controller.cpp +++ b/src/karts/controller/end_controller.cpp @@ -143,7 +143,8 @@ void EndController::reset() void EndController::newLap(int lap) { // This will implicitely trigger setting the first end camera to be active. - m_kart->getCamera()->setMode(Camera::CM_FINAL); + if(m_kart->getCamera()) + m_kart->getCamera()->setMode(Camera::CM_FINAL); } // newLap //-----------------------------------------------------------------------------