summaryrefslogtreecommitdiff
path: root/src/waypoint_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/waypoint_cmd.cpp')
-rw-r--r--src/waypoint_cmd.cpp2
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) {