Fix Histogram SEGV and Speed

.. SEGV caused by referencing data->isChecked when
   not in range mode

.. Speed plotting broken because line setting the
   array length in setData was accidentally deleted
This commit is contained in:
Mark Liversedge
2014-01-18 20:23:35 +00:00
parent a114164baa
commit b8e07dbcdd
2 changed files with 2 additions and 1 deletions

View File

@@ -366,7 +366,7 @@ HistogramWindow::compareChanged()
powerHist->setSumY(showSumY->currentIndex()== 0 ? true : false);
// set data and create empty curves
if (data->isChecked()) {
if (!rangemode || data->isChecked()) {
// using the bests (ride file cache)
powerHist->setDataFromCompare();
} else {

View File

@@ -374,6 +374,7 @@ PowerHist::recalcCompare()
} else if (series == RideFile::kph) {
array = &cid.kphArray;
arrayLength = cid.kphArray.size();
} else if (series == RideFile::cad) {
array = &cid.cadArray;