From 7cd005873dab7184ab9d2e4e7eca6c17418ff871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Wed, 23 Mar 2016 20:48:22 +0100 Subject: [PATCH] Added missing size check --- src/track.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/track.cpp b/src/track.cpp index b798f542..958407e6 100644 --- a/src/track.cpp +++ b/src/track.cpp @@ -146,6 +146,9 @@ void Track::heartRateGraph(QVector &graph) const qreal dist = 0; QVector raw; + if (!_data.size()) + return; + if (std::isnan(_data.at(0).heartRate)) return; raw.append(QPointF(0, _data.at(0).heartRate));