File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ Template for new versions:
5656## New Features
5757
5858## Fixes
59+ - `preserve-tombs`: will no longer crash when a tomb is assigned to a unit that does not exist
5960
6061## Misc Improvements
6162
Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ static void update_tomb_assignments(color_ostream &out) {
200200 if (!tomb || !tomb->flags .bits .exists ) continue ;
201201 if (tomb->assigned_unit_id == -1 ) continue ;
202202 auto unit = Buildings::getOwner (tomb);
203- if (Units::isDead (unit)) continue ; // we only care about living units
203+ if (!unit || Units::isDead (unit)) continue ; // we only care about living units
204204
205205 auto it = tomb_assignments.find (tomb->assigned_unit_id );
206206
You can’t perform that action at this time.
0 commit comments