Check for possible null m_confirmed_state
This commit is contained in:
parent
b1a535b21f
commit
553747237e
@ -319,11 +319,14 @@ void NetworkItemManager::restoreState(BareNetworkString *buffer, int count)
|
|||||||
// otherwise resulting in stuttering).
|
// otherwise resulting in stuttering).
|
||||||
int old_time = world->getTicksSinceStart(); // Save time we rewind to
|
int old_time = world->getTicksSinceStart(); // Save time we rewind to
|
||||||
world->setTicksForRewind(iei.getTicks()); // Set time of event
|
world->setTicksForRewind(iei.getTicks()); // Set time of event
|
||||||
collectedItem(m_confirmed_state[index], kart);// Collect item
|
|
||||||
|
|
||||||
// Reset till ticks return from state (required for eating banana with bomb)
|
if (m_confirmed_state[index] != NULL)
|
||||||
int ttr = iei.getTicksTillReturn();
|
{
|
||||||
m_confirmed_state[index]->setTicksTillReturn(ttr);
|
m_confirmed_state[index]->collected(kart);// Collect item
|
||||||
|
// Reset till ticks return from state (required for eating banana with bomb)
|
||||||
|
int ttr = iei.getTicksTillReturn();
|
||||||
|
m_confirmed_state[index]->setTicksTillReturn(ttr);
|
||||||
|
}
|
||||||
|
|
||||||
world->setTicksForRewind(old_time); // Set time to rewind-to
|
world->setTicksForRewind(old_time); // Set time to rewind-to
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user