From 267e6963c282cc2086017ffc22a467fa804452a6 Mon Sep 17 00:00:00 2001 From: hiker Date: Wed, 26 Aug 2015 17:15:59 +1000 Subject: [PATCH] Fixed #2294 (crash when kart is off road and not on material). --- src/modes/linear_world.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modes/linear_world.cpp b/src/modes/linear_world.cpp index 5e2e177c2..e45965160 100644 --- a/src/modes/linear_world.cpp +++ b/src/modes/linear_world.cpp @@ -179,7 +179,8 @@ void LinearWorld::update(float dt) // might get too close to another part of the track, shortly // jump to position one, then on reset fall back to last) if (!kart_info.getTrackSector()->isOnRoad() && - kart->getMaterial()->isDriveReset()) + (!kart->getMaterial() || + kart->getMaterial()->isDriveReset()) ) continue; kart_info.getTrackSector()->update(kart->getFrontXYZ()); kart_info.m_overall_distance = kart_info.m_race_lap