summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <[email protected]>2017-04-30 16:31:33 +0200
committerDennis Nienhüser <[email protected]>2017-05-22 20:49:19 +0200
commitf8e92ddbda0040cd73626c18959db66c1299d8fe (patch)
tree67d3814efdceffeb37579cd53dd6741f0f0e2d84
parent3bf73df7c944cc7d3e1445950acde34acc229d1a (diff)
Check coordinate validity
-rw-r--r--src/lib/marble/declarative/Navigation.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/marble/declarative/Navigation.cpp b/src/lib/marble/declarative/Navigation.cpp
index b7f14a5..1b7bf9a 100644
--- a/src/lib/marble/declarative/Navigation.cpp
+++ b/src/lib/marble/declarative/Navigation.cpp
@@ -237,7 +237,9 @@ QPointF NavigationPrivate::positionOnRoute() const
GeoDataCoordinates coordinates = routingModel->route().positionOnRoute();
qreal x = 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);
}