1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00

Properly handle routes without elevation data as well

This commit is contained in:
Martin Tůma 2019-09-29 00:03:14 +02:00
parent fa08c0dbea
commit c4fd82e5a0

View File

@ -32,7 +32,8 @@ Graph Route::elevation() const
GraphSegment &gs = graph.last();
for (int i = 0; i < _data.size(); i++)
gs.append(GraphPoint(_distance.at(i), NAN, _data.at(i).elevation()));
if (_data.at(i).hasElevation())
gs.append(GraphPoint(_distance.at(i), NAN, _data.at(i).elevation()));
return graph;
}