Skip to content

Commit

Permalink
Merge pull request #530 from Wargus/fix_double_free
Browse files Browse the repository at this point in the history
Remove double free (introduced with `std::unique_ptr<COrder>`).
  • Loading branch information
Jarod42 authored Oct 8, 2023
2 parents 0855820 + d22bc27 commit e3b5b7e
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/action/action_build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,6 @@ bool COrder_Build::StartBuilding(CUnit &unit, CUnit &ontop)
}

// Must set action before placing, otherwise it will incorrectly mark radar
delete build->CurrentOrder();
build->Orders[0] = COrder::NewActionBuilt(unit, *build);

UpdateUnitSightRange(*build);
Expand Down

0 comments on commit e3b5b7e

Please sign in to comment.