summaryrefslogtreecommitdiff
path: root/src/autoreplace_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/autoreplace_cmd.cpp')
-rw-r--r--src/autoreplace_cmd.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp
index 227ba19a4..0cafcaf1d 100644
--- a/src/autoreplace_cmd.cpp
+++ b/src/autoreplace_cmd.cpp
@@ -382,10 +382,8 @@ static CommandCost ReplaceFreeUnit(Vehicle **single_unit, uint32 flags, bool *no
*single_unit = new_v;
}
- if (cost.Succeeded()) {
- /* Sell the old vehicle */
- cost.AddCost(DoCommand(0, old_v->index, 0, flags, GetCmdSellVeh(old_v)));
- }
+ /* Sell the old vehicle */
+ cost.AddCost(DoCommand(0, old_v->index, 0, flags, GetCmdSellVeh(old_v)));
/* If we are not in DC_EXEC undo everything */
if ((flags & DC_EXEC) == 0) {