diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 33a5168644..06c3a8c9ab 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -1201,7 +1201,8 @@ CommandCost RemoveFromRailBaseStation(TileArea ta, SmallVector &affected /* Check ownership of station */ T *st = T::GetByTile(tile); - if (st != NULL && _current_company != OWNER_WATER && !CheckOwnership(st->owner)) continue; + if (st == NULL) continue; + if (_current_company != OWNER_WATER && !CheckOwnership(st->owner)) continue; /* Do not allow removing from stations if non-uniform stations are not enabled * The check must be here to give correct error message