diff options
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r-- | src/station_cmd.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index ca641577b..f9d8d2bdd 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -2895,12 +2895,9 @@ static void UpdateStationWaiting(Station *st, CargoID type, uint amount) static bool IsUniqueStationName(const char *name) { const Station *st; - char buf[512]; FOR_ALL_STATIONS(st) { - SetDParam(0, st->index); - GetString(buf, STR_STATION, lastof(buf)); - if (strcmp(buf, name) == 0) return false; + if (st->name != NULL && strcmp(st->name, name) == 0) return false; } return true; |