add a failure case check just in case

develop
20k 2023-02-27 02:06:36 +00:00
parent 3c1d3ce21c
commit c0bd452c86
1 changed files with 3 additions and 0 deletions

@ -50,6 +50,9 @@ df::squad* Military::makeSquad(int32_t assignment_id)
df::historical_entity* fort = df::historical_entity::find(df::global::plotinfo->group_id); df::historical_entity* fort = df::historical_entity::find(df::global::plotinfo->group_id);
if (fort == nullptr)
return nullptr;
df::entity_position_assignment* found_assignment = nullptr; df::entity_position_assignment* found_assignment = nullptr;
for (auto* assignment : fort->positions.assignments) for (auto* assignment : fort->positions.assignments)