Fix #48: Crash when building a station after some got removed

This commit is contained in:
dP
2026-01-02 04:17:58 +05:00
parent cd177e755e
commit e25f362afb

View File

@@ -2553,6 +2553,7 @@ void ShowSelectRoadWaypointIfNeeded(TileArea ta, StationPickerCmdProc proc)
namespace citymania { namespace citymania {
void ShowSelectStationWindow(TileArea ta, StationPickerCmdProc&& proc) { void ShowSelectStationWindow(TileArea ta, StationPickerCmdProc&& proc) {
if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace(); if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
FindStationsNearby<StationTypeFilter>(ta, false);
new SelectStationWindow<StationTypeFilter>(_select_station_desc, ta, std::move(proc)); new SelectStationWindow<StationTypeFilter>(_select_station_desc, ta, std::move(proc));
} }
} }