diff options
author | rubidium <rubidium@openttd.org> | 2009-07-23 12:02:09 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-07-23 12:02:09 +0000 |
commit | 16ad8df17555e4745b1c77d08d3d3e489a2d8e68 (patch) | |
tree | 1ebb60b62a40235b163aad7e729c33ea1138136f /src/waypoint_cmd.cpp | |
parent | fefc8809719a50e35143215d017400f26759eee9 (diff) | |
download | openttd-16ad8df17555e4745b1c77d08d3d3e489a2d8e68.tar.xz |
(svn r16925) -Fix (r16909): guard commands more against using waypoints as stations and/or accidentally reusing waypoints for stations or vice versa.
Diffstat (limited to 'src/waypoint_cmd.cpp')
-rw-r--r-- | src/waypoint_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/waypoint_cmd.cpp b/src/waypoint_cmd.cpp index 9d5fe88a6..7891d7aac 100644 --- a/src/waypoint_cmd.cpp +++ b/src/waypoint_cmd.cpp @@ -60,7 +60,7 @@ void MakeDefaultWaypointName(Waypoint *wp) WaypointID cid = 0; // current index, goes to Waypoint::GetPoolSize()-1, then wraps to 0 do { - Waypoint *lwp = Waypoint::Get(cid); + Waypoint *lwp = Waypoint::GetIfValid(cid); /* check only valid waypoints... */ if (lwp != NULL && wp != lwp) { |