summaryrefslogtreecommitdiff
path: root/misc/goldencheetah/patches/0001-SEGV-on-Overview-Chart.patch
blob: da451e86c434d9668a2e7120fffd5b029680fb3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From 372dd5c14415885c8808c4ad4729cb39ae717db0 Mon Sep 17 00:00:00 2001
From: Mark Liversedge <liversedge@gmail.com>
Date: Mon, 13 Jan 2020 20:21:00 +0000
Subject: SEGV on Overview Chart

.. when no rides available on new user.

Fixes #3295

diff --git a/src/Charts/OverviewWindow.cpp b/src/Charts/OverviewWindow.cpp
index bfbd31432..7aa0792df 100644
--- a/src/Charts/OverviewWindow.cpp
+++ b/src/Charts/OverviewWindow.cpp
@@ -558,6 +558,8 @@ static const QStringList timeInZonesWBAL = QStringList()
 void
 Card::setData(RideItem *item)
 {
+    if (item == NULL || item->ride() == NULL) return;
+
     // use ride colors in painting?
     ridecolor = item->color;