diff options
Diffstat (limited to 'qt-ui/profile/divetextitem.cpp')
-rw-r--r-- | qt-ui/profile/divetextitem.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/qt-ui/profile/divetextitem.cpp b/qt-ui/profile/divetextitem.cpp index 163bb64f4..72ba480a9 100644 --- a/qt-ui/profile/divetextitem.cpp +++ b/qt-ui/profile/divetextitem.cpp @@ -42,11 +42,13 @@ const QString& DiveTextItem::text() void DiveTextItem::updateText() { - if(internalText.isEmpty()) - return; - delete textItem; + textItem = NULL; delete textBackgroundItem; + textBackgroundItem = NULL; + if(internalText.isEmpty()){ + return; + } QFont fnt(qApp->font()); QFontMetrics fm(fnt); |