diff options
-rw-r--r-- | qt-ui/divelistview.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp index 9f7517308..9779d60e7 100644 --- a/qt-ui/divelistview.cpp +++ b/qt-ui/divelistview.cpp @@ -152,6 +152,8 @@ void DiveListView::unselectDives() void DiveListView::selectDive(int i, bool scrollto, bool toggle) { + if( i == -1) + return; QSortFilterProxyModel *m = qobject_cast<QSortFilterProxyModel*>(model()); QModelIndexList match = m->match(m->index(0,0), DiveTripModel::DIVE_IDX, i, 2, Qt::MatchRecursive); QItemSelectionModel::SelectionFlags flags; |