diff --git a/src/RideFileCache.cpp b/src/RideFileCache.cpp index ecc1f2ca2..bf97c341c 100644 --- a/src/RideFileCache.cpp +++ b/src/RideFileCache.cpp @@ -579,6 +579,10 @@ MeanMaxComputer::run() // fill in any gaps in recording - use same dodgy rounding as before int count = (psecs - lastsecs - ride->recIntSecs()) / ride->recIntSecs(); + + // gap more than an hour, damn that ride file is a mess + if (count > 3600) count = 1; + for(int i=0; irecIntSecs() *1000.0)/1000), 0)); lastsecs = psecs; @@ -597,6 +601,9 @@ MeanMaxComputer::run() // than 2 days, even if you are doing RAAM if (total_secs > 2*24*60*60) return; + // don't allow if badly parsed or time goes backwards + if (total_secs < 0) return; + // // Pre-process the data for NP, xPower and VAM // diff --git a/src/RideNavigatorProxy.h b/src/RideNavigatorProxy.h index 91d844f9e..8f182f935 100644 --- a/src/RideNavigatorProxy.h +++ b/src/RideNavigatorProxy.h @@ -370,6 +370,7 @@ public: QString whichGroup(int row) const { + if (row == -1) return(""); if (groupBy == -1) return tr("All Activities"); else return groupFromValue(headerData(groupBy+1, Qt::Horizontal).toString(),