Fix crash

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4579 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2016-07-17 10:16:37 +00:00
parent 5b94654ed7
commit 5cd00517c5

View File

@@ -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;