mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 08:08:42 +00:00
Fix crash on openRideFile
The recent data processor / ride editor patch added some post-processing actions after a ride file is opened. The functions are called without checking for an open ride failure. This patch fixes that stupid error.
This commit is contained in:
@@ -251,10 +251,12 @@ RideFile *RideFileFactory::openRideFile(QFile &file,
|
||||
assert(reader);
|
||||
RideFile *result = reader->openRideFile(file, errors);
|
||||
|
||||
if (result->intervals().empty()) result->fillInIntervals();
|
||||
|
||||
result->setTag("Filename", file.fileName());
|
||||
DataProcessorFactory::instance().autoProcess(result);
|
||||
// NULL returned to indicate openRide failed
|
||||
if (result) {
|
||||
if (result->intervals().empty()) result->fillInIntervals();
|
||||
result->setTag("Filename", file.fileName());
|
||||
DataProcessorFactory::instance().autoProcess(result);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user