summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rail_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index cbe1e65ef..54380b7e7 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -1087,9 +1087,9 @@ static CommandCost CmdSignalTrackHelper(TileIndex tile, uint32 flags, uint32 p1,
if (sigtype > SIGTYPE_LAST) return CMD_ERROR;
/* copy the signal-style of the first rail-piece if existing */
- if (HasSignals(tile)) {
+ if (HasSignalOnTrack(tile, track)) {
signals = GetPresentSignals(tile) & SignalOnTrack(track);
- if (signals == 0) signals = SignalOnTrack(track); /* Can this actually occur? */
+ assert(signals != 0);
/* copy signal/semaphores style (independent of CTRL) */
semaphores = GetSignalVariant(tile, track) != SIG_ELECTRIC;