Skip to content

Commit

Permalink
BR#3371 - Fixes an issue where not capturing goods from a ship preven…
Browse files Browse the repository at this point in the history
…ts ending the turn. The reason was that the loot-cargo-session was never ended when no types of goods were selected.
  • Loading branch information
stiangre committed Oct 16, 2024
1 parent 75665a3 commit fb1bb8f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/net/sf/freecol/client/control/InGameController.java
Original file line number Diff line number Diff line change
Expand Up @@ -3898,8 +3898,9 @@ public void logoutHandler(Player player, LogoutReason reason) {
* @return True if looting occurs.
*/
private boolean lootCargo(Unit unit, List<Goods> goods, String defenderId) {
if (unit == null || goods == null || goods.isEmpty()
|| defenderId == null) return false;
if (unit == null || goods == null || defenderId == null) {
return false;
}

UnitWas unitWas = new UnitWas(unit);
boolean ret = askServer().loot(unit, defenderId, goods);
Expand Down

0 comments on commit fb1bb8f

Please sign in to comment.