diff options
author | Liang Qi <liang.qi@qt.io> | 2018-10-30 09:45:30 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-10-30 09:45:30 +0100 |
commit | 563f6eb62fc614d435bf29337e182d82131b5b87 (patch) | |
tree | 7e27a71eb96c0ba9079994d4336ec3348271557a /src/positioning | |
parent | eb3143f22ca1642056d821b73af493cdab59dd85 (diff) | |
parent | 6b109d09982e09940dc8e777430a04410d7b6550 (diff) | |
download | qtlocation-563f6eb62fc614d435bf29337e182d82131b5b87.tar.gz |
Merge remote-tracking branch 'origin/5.11' into 5.12.0v5.12.0-beta4
Change-Id: I0f4a3b7bc7c5c7f8da5af631000a6d5156884efe
Diffstat (limited to 'src/positioning')
-rw-r--r-- | src/positioning/qgeopath.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/positioning/qgeopath.cpp b/src/positioning/qgeopath.cpp index 35d82b5f..beb43692 100644 --- a/src/positioning/qgeopath.cpp +++ b/src/positioning/qgeopath.cpp @@ -483,6 +483,9 @@ void QGeoPathPrivate::setWidth(const qreal &width) double QGeoPathPrivate::length(int indexFrom, int indexTo) const { + if (path().isEmpty()) + return 0.0; + bool wrap = indexTo == -1; if (indexTo < 0 || indexTo >= path().size()) indexTo = path().size() - 1; |