mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 08:38:45 +00:00
NULL/Empty ride checks
RideItem or RideFile or dataPoints() may be null or empty. This is especially true of manual ridefiles. This patch adds some checks for this situation and acts accordingly. Additionally, the disable/enable of tabs depending upon ridefile type has been adjusted to also include files with not dataPoints.
This commit is contained in:
committed by
Sean Rhea
parent
4e7e6cfb3a
commit
d64fc6ea85
@@ -91,8 +91,9 @@ PfPvWindow::rideSelected()
|
||||
if (mainWindow->activeTab() != this)
|
||||
return;
|
||||
RideItem *ride = mainWindow->rideItem();
|
||||
if (!ride)
|
||||
if (!ride || !ride->ride())
|
||||
return;
|
||||
|
||||
pfPvPlot->setData(ride);
|
||||
// update the QLabel widget with the CP value set in PfPvPlot::setData()
|
||||
qaCPValue->setText(QString("%1").arg(pfPvPlot->getCP()));
|
||||
|
||||
Reference in New Issue
Block a user