Fix assertion when no spare tire karts

This commit is contained in:
Benau
2016-10-09 17:41:20 +08:00
committed by GitHub
parent b4907f5519
commit fdcb4dac8d

View File

@@ -591,8 +591,9 @@ void ThreeStrikesBattle::enterRaceOverState()
//-----------------------------------------------------------------------------
bool ThreeStrikesBattle::spareTireKartsSpawned() const
{
if (m_spare_tire_karts.empty()) return false;
// Spare tire karts are spawned if at least 1 of them needs update
assert(!m_spare_tire_karts.empty());
SpareTireAI* sta =
dynamic_cast<SpareTireAI*>(m_spare_tire_karts[0]->getController());
assert(sta);