Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for crash during air battle (#12772)
Problem: 'oldUnits' is stateful and may already contain units. We then "double add" a unit in the following code block (RemoveUnitsHistoryChange.java:71) ``` final Collection<Unit> allUnloadedUnits = new HashSet<>(); for (Unit u : killedUnits) { oldUnits.add(u); ``` To resolve this issue, the 'oldUnits' and 'killedUnits' is converted into a set, which removes duplicate units. (This 'fix' is not very deep, arguably this is a hack. Why is the duplicate unit being added in the first place?) Resolves: #12770
- Loading branch information