mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 07:29:44 +00:00
(svn r17039) -Fix (r16988): segfault when removing rail with waypoint remover and vice versa
This commit is contained in:
parent
95c204ebee
commit
74cec1f0c4
@ -1201,7 +1201,8 @@ CommandCost RemoveFromRailBaseStation(TileArea ta, SmallVector<T *, 4> &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
|
||||
|
Loading…
Reference in New Issue
Block a user