Mercurial > hg > openttd
changeset 12596:8545e48ce63f draft
(svn r17039) -Fix (r16988): segfault when removing rail with waypoint remover and vice versa
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sun, 02 Aug 2009 14:54:42 +0000 |
parents | 10ec5a122e8a |
children | 9b9defcd4226 |
files | src/station_cmd.cpp |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -1201,7 +1201,8 @@ /* 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