(svn r16925) -Fix (r16909): guard commands more against using waypoints as stations and/or accidentally reusing waypoints for stations or vice versa.

This commit is contained in:
rubidium
2009-07-23 12:02:09 +00:00
parent dd5e4d7366
commit 7f08aa4572
2 changed files with 8 additions and 8 deletions

View File

@@ -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) {