Version 3 - No Ridefiles Bugs Bonanza

When no ridefiles are available (new cyclist) or the last ridefile
is deleted the current ride will be null. In addition the ride
importer deletes the memory for a ride imported to ensure VM is not
exhausted on large imports.

This patch fixes a whole host of null errors across the codebase. They
were identified by creating a new cyclist, executing every menu option
and tab/chart and then importing a file choosing everything and then
deleting the file and choosing every option again.

This negative testing should be performed before every stable release since
it has identified at least 6 bugs which are almost certainly present in the
current V2 code.
This commit is contained in:
Mark Liversedge
2011-04-09 11:24:40 +01:00
parent 53a8167787
commit 6af6b347bf
10 changed files with 52 additions and 13 deletions

View File

@@ -291,7 +291,7 @@ void GoogleMapControl::createHtml()
}
}
RideItem * ride = myRideItem;
if(!ride->ride() || ride->ride()->areDataPresent()->lat == false ||
if(!ride || !ride->ride() || ride->ride()->areDataPresent()->lat == false ||
ride->ride()->areDataPresent()->lon == false)
{
currentPage << tr("No GPS Data Present").toStdString();