Commit 559931f3 authored by Lorenz Meier's avatar Lorenz Meier

Guard against system with waypoints already loaded

parent 99d187a4
...@@ -390,6 +390,7 @@ void WaypointList::currentWaypointEditableChanged(quint16 seq) ...@@ -390,6 +390,7 @@ void WaypointList::currentWaypointEditableChanged(quint16 seq)
{ {
WaypointEditableView* widget = wpEditableViews.find(waypoints[i]).value(); WaypointEditableView* widget = wpEditableViews.find(waypoints[i]).value();
if (widget) {
if (waypoints[i]->getId() == seq) if (waypoints[i]->getId() == seq)
{ {
widget->setCurrent(true); widget->setCurrent(true);
...@@ -400,6 +401,7 @@ void WaypointList::currentWaypointEditableChanged(quint16 seq) ...@@ -400,6 +401,7 @@ void WaypointList::currentWaypointEditableChanged(quint16 seq)
} }
} }
} }
}
} }
// Update waypointViews to correctly indicate the new current waypoint // Update waypointViews to correctly indicate the new current waypoint
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment