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, 2 insertions, 0 deletions
diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp
index 5599b7eaf..e740640e2 100644
--- a/qt-ui/profile/diveprofileitem.cpp
+++ b/qt-ui/profile/diveprofileitem.cpp
@@ -367,6 +367,8 @@ void DiveCalculatedCeiling::modelDataChanged()
AbstractProfilePolygonItem::modelDataChanged();
// Add 2 points to close the polygon.
QPolygonF poly = polygon();
+ if (poly.isEmpty())
+ return;
QPointF p1 = poly.first();
QPointF p2 = poly.last();