Fixed the unit_creator crash part of bug #24439
This commit is contained in:
parent
2732b21610
commit
f4cb656921
1 changed files with 4 additions and 1 deletions
|
@ -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) {
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue