Changeset - r12586:54de0e97d6e2
[Not reviewed]
master
0 1 0
rubidium - 15 years ago 2009-08-02 14:54:42
rubidium@openttd.org
(svn r17039) -Fix (r16988): segfault when removing rail with waypoint remover and vice versa
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/station_cmd.cpp
Show inline comments
 
@@ -1198,13 +1198,14 @@ CommandCost RemoveFromRailBaseStation(Ti
 

	
 
		/* If there is a vehicle on ground, do not allow to remove (flood) the tile */
 
		if (!EnsureNoVehicleOnGround(tile)) continue;
 

	
 
		/* 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
 
		 */
 
		if (!_settings_game.station.nonuniform_stations) return_cmd_error(STR_NONUNIFORM_STATIONS_DISALLOWED);
 

	
0 comments (0 inline, 0 general)