diff options
-rw-r--r-- | qt-models/divelistmodel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-models/divelistmodel.cpp b/qt-models/divelistmodel.cpp index f85e5e521..72ce90049 100644 --- a/qt-models/divelistmodel.cpp +++ b/qt-models/divelistmodel.cpp @@ -238,7 +238,7 @@ int DiveListModel::getDiveIdx(int id) const QVariant DiveListModel::data(const QModelIndex &index, int role) const { - if(index.row() < 0 || index.row() > m_dives.count()) + if(index.row() < 0 || index.row() >= m_dives.count()) return QVariant(); DiveObjectHelper *curr_dive = m_dives[index.row()]; |