Fix Crash on Interval selection when last ride deleted

If you delete the last ride and then select an interval in the
interval widget Interval summary window crashes. This patch fixes
this. It should have been picked up in the Null ride files tests
from last week, but slipped through.
This commit is contained in:
Mark Liversedge
2011-04-17 18:59:30 +01:00
parent d7d89e63e5
commit 888ec7a6d9

View File

@@ -34,6 +34,9 @@ IntervalSummaryWindow::~IntervalSummaryWindow() {
void IntervalSummaryWindow::intervalSelected()
{
// if no ride available don't bother
if (mainWindow->currentRideItem() == NULL || mainWindow->currentRide() == NULL) return;
QString html;
if (mainWindow->allIntervalItems() != NULL) {
for (int i=0; i<mainWindow->allIntervalItems()->childCount(); i++) {