Skip to content

Commit

Permalink
Fixed the unit_creator crash part of bug #24439
Browse files Browse the repository at this point in the history
  • Loading branch information
ln-zookeeper committed Feb 27, 2016
1 parent 2732b21 commit f4cb656
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/actions/unit_creator.cpp
Expand Up @@ -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) {

Expand Down

0 comments on commit f4cb656

Please sign in to comment.