summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/train_cmd.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 1dd977353..0be119ef9 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -4436,6 +4436,7 @@ Money Train::GetRunningCost() const
do {
const RailVehicleInfo *rvi = RailVehInfo(v->engine_type);
+ if (rvi->running_cost_class == INVALID_PRICE) continue;
byte cost_factor = GetVehicleProperty(v, PROP_TRAIN_RUNNING_COST_FACTOR, rvi->running_cost);
if (cost_factor == 0) continue;