mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 08:38:45 +00:00
Fix SEGV in LTMPlot on negative date range
.. time should, in theory, always fly forwards, no quarks here.
This commit is contained in:
@@ -2725,6 +2725,9 @@ LTMPlot::createPMCData(Context *context, LTMSettings *settings, MetricDetail met
|
||||
int maxdays = groupForDate(settings->end.date(), settings->groupBy)
|
||||
- groupForDate(settings->start.date(), settings->groupBy);
|
||||
|
||||
// skip for negative or empty time periods.
|
||||
if (maxdays <=0) return;
|
||||
|
||||
x.resize(maxdays+3); // one for start from zero plus two for 0 value added at head and tail
|
||||
y.resize(maxdays+3); // one for start from zero plus two for 0 value added at head and tail
|
||||
|
||||
|
||||
Reference in New Issue
Block a user