summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/economy.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/economy.cpp b/src/economy.cpp
index 5cc2788b6..46b8ac90b 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -1519,6 +1519,9 @@ static void LoadUnloadVehicle(Vehicle *v, int *cargo_left)
*/
void LoadUnloadStation(Station *st)
{
+ /* No vehicle is here... */
+ if (st->loading_vehicles.empty()) return;
+
int cargo_left[NUM_CARGO];
for (uint i = 0; i < NUM_CARGO; i++) cargo_left[i] = st->goods[i].cargo.Count();