1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-01-31 17:15:14 +01:00

Fixed crash on tracks with less than window size points

This commit is contained in:
Martin Tůma 2018-02-15 01:43:04 +01:00
parent 9556476f1b
commit 94ee5b6e67

View File

@ -49,9 +49,7 @@ static QSet<int> eliminate(const QVector<qreal> &v, int window)
static Graph filter(const Graph &g, int window) static Graph filter(const Graph &g, int window)
{ {
if (g.size() < window) if (g.size() < window || window < 2)
return Graph();
if (window < 2)
return Graph(g); return Graph(g);
qreal acc = 0; qreal acc = 0;