Fixed a crash when starting ghost replay

This commit is contained in:
Deve 2017-09-12 20:14:10 +02:00
parent 6829bb1e51
commit be4d0e7208

View File

@ -377,8 +377,6 @@ void Kart::reset()
if(m_body)
m_body->setDamping(m_kart_properties->getStabilityChassisLinearDamping(),
m_kart_properties->getStabilityChassisAngularDamping());
for (unsigned int i = 0; i < 4; i++)
m_vehicle->getWheelInfo(i).m_steering = 0;
if(m_terrain_sound)
{
@ -396,8 +394,14 @@ void Kart::reset()
m_controls.reset();
m_slipstream->reset();
if(m_vehicle)
{
for (unsigned int i = 0; i < 4; i++)
{
m_vehicle->getWheelInfo(i).m_steering = 0;
}
m_vehicle->reset();
}