mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-04-15 05:32:21 +00:00
Fix WPK interval metric crash
.. recent update to use getWeight() in the ride file caused a SEGV as interval metric computation is done on the fly against a 'manufactured' ride file. .. That ridefile doesn't have a mainwindow reference in it, so when getWeight() references mainwindow->metricDB a SEGV occurred.
This commit is contained in:
@@ -429,6 +429,7 @@ RideSummaryWindow::htmlSummary() const
|
||||
bool even = false;
|
||||
foreach (RideFileInterval interval, ride->intervals()) {
|
||||
RideFile f(ride->startTime(), ride->recIntSecs());
|
||||
f.mainwindow = mainWindow; // hack, until we refactor athlete and mainwindow
|
||||
for (int i = ride->intervalBegin(interval); i < ride->dataPoints().size(); ++i) {
|
||||
const RideFilePoint *p = ride->dataPoints()[i];
|
||||
if (p->secs >= interval.stop)
|
||||
|
||||
Reference in New Issue
Block a user