From 5cd00517c568705d705cf53fc31383f7ce6253f8 Mon Sep 17 00:00:00 2001 From: blacksun Date: Sun, 17 Jul 2016 10:16:37 +0000 Subject: [PATCH] Fix crash git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4579 bfdf4180-ca20-0410-9c96-a3a8aa849046 --- sources/qetgraphicsitem/slaveelement.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sources/qetgraphicsitem/slaveelement.cpp b/sources/qetgraphicsitem/slaveelement.cpp index 041cb0ea6..7876f98ca 100644 --- a/sources/qetgraphicsitem/slaveelement.cpp +++ b/sources/qetgraphicsitem/slaveelement.cpp @@ -125,9 +125,11 @@ void SlaveElement::unlinkElement(Element *elmt) * the label show the string tagged by "label" of the master * and add a qgraphicstextitem for show the position of the master */ -void SlaveElement::updateLabel() { - - QString label = this->taggedText("label")->toPlainText(); +void SlaveElement::updateLabel() +{ + QString label; + if (ElementTextItem *eti = this->taggedText("label")) + label = eti->toPlainText(); QString Xreflabel; bool no_editable = false;