Fix --track-debug crash

This commit is contained in:
Benau 2017-02-11 14:42:24 +08:00
parent 3f214c1bb7
commit 0ddada2897

View File

@ -140,6 +140,7 @@ void CheckLine::reset(const Track &track)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
void CheckLine::resetAfterKartMove(unsigned int kart_index) void CheckLine::resetAfterKartMove(unsigned int kart_index)
{ {
if (m_previous_position.empty()) return;
AbstractKart *kart = World::getWorld()->getKart(kart_index); AbstractKart *kart = World::getWorld()->getKart(kart_index);
m_previous_position[kart_index] = kart->getXYZ(); m_previous_position[kart_index] = kart->getXYZ();
} // resetAfterKartMove } // resetAfterKartMove