Fix crash

embark-assistant.cpp: Move call to survey::initiate() after call to survey::setup(), otherwise state won't exist
develop
bseiller 2021-02-04 01:10:10 +01:00
parent 52bf998224
commit efc92750fa
1 changed files with 1 additions and 1 deletions

@ -285,7 +285,6 @@ command_result embark_assistant(color_ostream &out, std::vector <std::string> &
} }
embark_assist::main::state = new embark_assist::main::states; embark_assist::main::state = new embark_assist::main::states;
embark_assist::survey::initiate(&embark_assist::main::state->mlt);
embark_assist::main::state->match_iterator.active = false; embark_assist::main::state->match_iterator.active = false;
@ -310,6 +309,7 @@ command_result embark_assistant(color_ostream &out, std::vector <std::string> &
} }
embark_assist::survey::setup(embark_assist::main::state->max_inorganic); embark_assist::survey::setup(embark_assist::main::state->max_inorganic);
embark_assist::survey::initiate(&embark_assist::main::state->mlt);
embark_assist::matcher::setup(); embark_assist::matcher::setup();
embark_assist::main::state->geo_summary.resize(world_data->geo_biomes.size()); embark_assist::main::state->geo_summary.resize(world_data->geo_biomes.size());
embark_assist::main::state->survey_results.resize(world->worldgen.worldgen_parms.dim_x); embark_assist::main::state->survey_results.resize(world->worldgen.worldgen_parms.dim_x);