aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/profile
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/profile')
-rw-r--r--qt-ui/profile/diveplotdatamodel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/profile/diveplotdatamodel.cpp b/qt-ui/profile/diveplotdatamodel.cpp
index cb3b07c50..2f81999c2 100644
--- a/qt-ui/profile/diveplotdatamodel.cpp
+++ b/qt-ui/profile/diveplotdatamodel.cpp
@@ -20,7 +20,7 @@ int DivePlotDataModel::columnCount(const QModelIndex& parent) const
QVariant DivePlotDataModel::data(const QModelIndex& index, int role) const
{
- if (!index.isValid())
+ if ((!index.isValid())||(index.row() >= pInfo.nr))
return QVariant();
plot_data item = pInfo.entry[index.row()];