Temporary Fix for Ride Selection after NULL ride selected

When you clicked on 'All Rides' mainwindow emits a rideSelected
signal with a ridefile of NULL. When then selecting a valid ride
a SEGV occurred.

This temporary fix removes that signal, but the underlying issue
related to actions after a NULL ride is selected need to be resolved.

Fixes #318.
This commit is contained in:
Mark Liversedge
2011-04-26 21:31:43 +01:00
parent 2ad6c3d252
commit e8d213c444

View File

@@ -1204,8 +1204,7 @@ MainWindow::rideTreeWidgetSelectionChanged()
ride = NULL;
else {
QTreeWidgetItem *which = treeWidget->selectedItems().first();
if (which->type() != RIDE_TYPE)
ride = NULL;
if (which->type() != RIDE_TYPE) return; // ignore!
else
ride = (RideItem*) which;
}