diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -1588,6 +1588,7 @@ CommandCost CmdConvertRail(TileIndex til } } + delete iter; return (cost.GetCost() == 0) ? error : cost; }