diff --git a/src/modes/world.cpp b/src/modes/world.cpp index c0abae58f..35b2d3eff 100644 --- a/src/modes/world.cpp +++ b/src/modes/world.cpp @@ -671,8 +671,14 @@ void World::unpause() sfx_manager->resumeAll(); WorldStatus::unpause(); for(unsigned int i=0; igetController()->isPlayerController()) - ((PlayerController*)(m_karts[i]->getController()))->resetInputState(); + { + // Note that we can not test for isPlayerController here, since + // an EndController will also return 'isPlayerController' if the + // kart belonged to a player. + PlayerController *pc = dynamic_cast(m_karts[i]->getController()); + if(pc) + pc->resetInputState(); + } } // pause /* EOF */