From 8bf56f39f20d77695e0c71340f7284f67053a4f5 Mon Sep 17 00:00:00 2001 From: Nicolas Chappe <74881848+nchappe@users.noreply.github.com> Date: Mon, 20 Dec 2021 18:00:12 +0100 Subject: [PATCH] Fix #9708: [Linkgraph] Don't assume vehicles have a non-zero max speed --- src/linkgraph/refresh.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/linkgraph/refresh.cpp b/src/linkgraph/refresh.cpp index b2dafa99e7..f62a4347d3 100644 --- a/src/linkgraph/refresh.cpp +++ b/src/linkgraph/refresh.cpp @@ -210,6 +210,8 @@ void LinkRefresher::RefreshStats(const Order *cur, const Order *next) uint cargo_quantity = this->capacities[c]; if (cargo_quantity == 0) continue; + if (this->vehicle->GetDisplayMaxSpeed() == 0) continue; + /* If not allowed to merge link graphs, make sure the stations are * already in the same link graph. */ if (!this->allow_merge && st->goods[c].link_graph != st_to->goods[c].link_graph) {