aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cpp/hrGraph.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cpp/hrGraph.cpp b/src/cpp/hrGraph.cpp
index ea42b13..ccec424 100644
--- a/src/cpp/hrGraph.cpp
+++ b/src/cpp/hrGraph.cpp
@@ -77,6 +77,10 @@ void HrGraph::paint(QPainter *painter)
void HrGraph::loadGraphData(QVariant fileDataInput) {
qDebug() << "loadGraphData called";
QList<QVariant> fileDataAsList = fileDataInput.toList();
+ if (fileDataAsList.count() < 1) {
+ qDebug() << "no heartrate data to show, failing load";
+ return;
+ }
int j = fileDataAsList.count();
minTime = fileDataAsList[0].toPoint().x();
maxTime = fileDataAsList[j-1].toPoint().x();