Fixed the unit_creator crash part of bug #24439

This commit is contained in:
ln-zookeeper 2016-02-27 21:20:58 +02:00
parent 2732b21610
commit f4cb656921

View file

@ -217,7 +217,10 @@ void unit_creator::post_create(const map_location &loc, const unit &new_unit, bo
}
}
resources::game_events->pump().fire("unit placed", loc);
// Only fire the events if it's safe; it's not if we're in the middle of play_controller::reset_gamestate()
if (resources::lua_kernel != NULL) {
resources::game_events->pump().fire("unit placed", loc);
}
if (resources::screen!=NULL) {