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:
parent
9556476f1b
commit
94ee5b6e67
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user