diff --git a/src/economy.cpp b/src/economy.cpp index de1c5e03f6..a57de5964e 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -2395,8 +2395,8 @@ static void LoadUnloadVehicle(Vehicle *front) } if (dirty_station) { st->MarkTilesDirty(true); - SetWindowDirty(WC_STATION_VIEW, last_visited); - InvalidateWindowData(WC_STATION_LIST, last_visited); + SetWindowDirty(WC_STATION_VIEW, st->index); + InvalidateWindowData(WC_STATION_LIST, st->owner); } } diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index d5006af352..8e2a0b6b47 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -4708,7 +4708,7 @@ static uint UpdateStationWaiting(Station *st, CargoID type, uint amount, SourceT if (lg != nullptr) (*lg)[ge.node].UpdateSupply(amount); if (!ge.HasRating()) { - InvalidateWindowData(WC_STATION_LIST, st->index); + InvalidateWindowData(WC_STATION_LIST, st->owner); SetBit(ge.status, GoodsEntry::GES_RATING); }