Fixed unit test (accessing world which does not exist during
unit tests, when delaying cakes at start of race).
This commit is contained in:
parent
20882b9e29
commit
7fec380398
@ -604,8 +604,9 @@ PowerupManager::PowerupType PowerupManager::getRandomPowerup(unsigned int pos,
|
||||
*n=1;
|
||||
|
||||
// Prevents early explosive items
|
||||
if (stk_config->ticks2Time(World::getWorld()->getTicksSinceStart()) <
|
||||
stk_config->m_no_explosive_items_timeout)
|
||||
if (World::getWorld() &&
|
||||
stk_config->ticks2Time(World::getWorld()->getTicksSinceStart()) <
|
||||
stk_config->m_no_explosive_items_timeout)
|
||||
{
|
||||
if (powerup == POWERUP_CAKE || powerup == POWERUP_RUBBERBALL)
|
||||
powerup = POWERUP_BOWLING;
|
||||
|
Loading…
x
Reference in New Issue
Block a user