Commit f8e92ddb authored by Dennis Nienhüser's avatar Dennis Nienhüser

Check coordinate validity

parent 3bf73df7
...@@ -237,7 +237,9 @@ QPointF NavigationPrivate::positionOnRoute() const ...@@ -237,7 +237,9 @@ QPointF NavigationPrivate::positionOnRoute() const
GeoDataCoordinates coordinates = routingModel->route().positionOnRoute(); GeoDataCoordinates coordinates = routingModel->route().positionOnRoute();
qreal x = 0; qreal x = 0;
qreal y = 0; qreal y = 0;
m_marbleQuickItem->map()->viewport()->screenCoordinates(coordinates, x, y); if (coordinates.isValid()) {
m_marbleQuickItem->map()->viewport()->screenCoordinates(coordinates, x, y);
}
return QPointF(x,y); return QPointF(x,y);
} }
......
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