summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/models.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index 0778b7bca..9246a0b07 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -1138,6 +1138,8 @@ QVariant DiveItem::data(int column, int role) const
{
QVariant retVal;
struct dive *dive = get_dive_by_uniq_id(diveId);
+ if (!dive)
+ return QVariant();
switch (role) {
case Qt::TextAlignmentRole: