Skip to content

Commit

Permalink
Guard against system with waypoints already loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzMeier committed May 6, 2014
1 parent 99d187a commit 559931f
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/ui/WaypointList.cc
Original file line number Diff line number Diff line change
Expand Up @@ -390,13 +390,15 @@ void WaypointList::currentWaypointEditableChanged(quint16 seq)
{
WaypointEditableView* widget = wpEditableViews.find(waypoints[i]).value();

if (waypoints[i]->getId() == seq)
{
widget->setCurrent(true);
}
else
{
widget->setCurrent(false);
if (widget) {
if (waypoints[i]->getId() == seq)
{
widget->setCurrent(true);
}
else
{
widget->setCurrent(false);
}
}
}
}
Expand Down

0 comments on commit 559931f

Please sign in to comment.