diff --git a/src/economy.cpp b/src/economy.cpp index 53bd70c6a8..d168381465 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -1933,8 +1933,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 784b4bac37..0444a3feed 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -4055,7 +4055,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); }