Fix metric refresh SEGV

.. last commit didn't avoid the detach() derefernce in a thread because
   it used the [] operator which is non-const, instead we should use
   QVector::at(int)
This commit is contained in:
Mark Liversedge
2020-05-08 20:05:31 +01:00
parent fd0a5955ef
commit d3c04e27fa

View File

@@ -67,7 +67,7 @@ RideCacheModel::data(const QModelIndex &index, int role) const
if (!index.isValid() || index.row() < 0 || index.row() >= rideCache->count() ||
index.column() < 0 || index.column() >= columns_) return QVariant();
const RideItem *item = rideCache->rides()[index.row()];
const RideItem *item = rideCache->rides().at(index.row());
switch (index.column()) {
case 0 : return item->path;