mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 16:39:57 +00:00
ignore rides that don't load properly
Need to call item->ride() in order to load the ride, and should ignore those for which the result is NULL. Do this after checking the date, though, so that we don't load older rides into memory.
This commit is contained in:
@@ -991,9 +991,9 @@ void MainWindow::getBSFactors(float &timeBS, float &distanceBS)
|
||||
for (int i = 0; i < allRides->childCount(); ++i) {
|
||||
RideItem *item = (RideItem*) allRides->child(i);
|
||||
int days = item->dateTime.daysTo(lastRideItem->dateTime);
|
||||
if ((item->type() == RIDE_TYPE) &&
|
||||
// (item->ride) &&
|
||||
(days >= 0) && (days < BSdays.toInt())) {
|
||||
if ((item->type() == RIDE_TYPE)
|
||||
&& (days >= 0) && (days < BSdays.toInt())
|
||||
&& (item->ride())) {
|
||||
|
||||
RideMetricPtr m;
|
||||
item->computeMetrics();
|
||||
|
||||
Reference in New Issue
Block a user