summaryrefslogtreecommitdiff
path: root/src/roadveh_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r--src/roadveh_cmd.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index f29efb60a..1798e75a3 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -356,6 +356,8 @@ CommandCost CmdTurnRoadVeh(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
RoadVehicle *v = RoadVehicle::GetIfValid(p1);
if (v == NULL) return CMD_ERROR;
+ if (!v->IsPrimaryVehicle()) return CMD_ERROR;
+
CommandCost ret = CheckOwnership(v->owner);
if (ret.Failed()) return ret;