summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-06-24 23:38:10 +0000
committersmatz <smatz@openttd.org>2008-06-24 23:38:10 +0000
commit7c7e08df591a41f51053cfa4f938307440047ecb (patch)
treee0752a8b7f6c6244e6961a3a1ee10715fdac6e6e /src
parentfdbb1f475bc1fcfc18e6cae16d2894fcb1259c08 (diff)
downloadopenttd-7c7e08df591a41f51053cfa4f938307440047ecb.tar.xz
(svn r13626) -Fix (r11871): signals were not updated when player removed signals from nonexistent track sharing bits with existing track
So disallow removing signals from nonexistent track
Diffstat (limited to 'src')
-rw-r--r--src/rail_cmd.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index af1fa1cc5..f750a3027 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -1113,6 +1113,7 @@ CommandCost CmdRemoveSingleSignal(TileIndex tile, uint32 flags, uint32 p1, uint3
if (!ValParamTrackOrientation(track) ||
!IsTileType(tile, MP_RAILWAY) ||
+ !HasTrack(tile, track) ||
!EnsureNoTrainOnTrack(tile, track) ||
!HasSignalOnTrack(tile, track)) {
return CMD_ERROR;