summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/diveprofileitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/profile/diveprofileitem.cpp')
-rw-r--r--qt-ui/profile/diveprofileitem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp
index 0768f38f6..c2c95bd89 100644
--- a/qt-ui/profile/diveprofileitem.cpp
+++ b/qt-ui/profile/diveprofileitem.cpp
@@ -258,7 +258,7 @@ void DiveTemperatureItem::paint(QPainter* painter, const QStyleOptionGraphicsIte
void DiveGasPressureItem::modelDataChanged()
{
// We don't have enougth data to calculate things, quit.
- if (!hAxis || !vAxis || !dataModel || hDataColumn == -1 || vDataColumn == -1)
+ if (!hAxis || !vAxis || !dataModel || hDataColumn == -1 || vDataColumn == -1 || dataModel->rowCount() == 0)
return;
int last_index = -1;
int lift_pen = false;