summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/profile/diveprofileitem.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp
index a07132fbb..58dfa4933 100644
--- a/qt-ui/profile/diveprofileitem.cpp
+++ b/qt-ui/profile/diveprofileitem.cpp
@@ -267,7 +267,8 @@ void DiveTemperatureItem::modelDataChanged(const QModelIndex& topLeft, const QMo
((abs(last_valid_temp - last_printed_temp) > 500) || ((double)last / (double)sec < 0.75))) {
createTextItem(sec, last_valid_temp);
}
- texts.last()->setAlignment(Qt::AlignLeft | Qt::AlignBottom);
+ if( texts.count())
+ texts.last()->setAlignment(Qt::AlignLeft | Qt::AlignBottom);
}
void DiveTemperatureItem::createTextItem(int sec, int mkelvin)