1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-07-22 23:04:23 +02:00

Properly handle files without elevation data

This commit is contained in:
2019-09-28 23:56:59 +02:00
parent 070eff2115
commit fa08c0dbea
3 changed files with 2 additions and 3 deletions

View File

@ -1,4 +1,3 @@
#include "dem.h"
#include "track.h"
@ -177,7 +176,7 @@ Graph Track::elevation() const
GraphSegment gs;
for (int j = 0; j < sd.size(); j++) {
if (seg.outliers.contains(j))
if (!sd.at(j).hasElevation() || seg.outliers.contains(j))
continue;
gs.append(GraphPoint(seg.distance.at(j), seg.time.at(j),
sd.at(j).elevation()));