diff --git a/sources/diagramcommands.cpp b/sources/diagramcommands.cpp index 6de48bd5c..a4d39fd4a 100644 --- a/sources/diagramcommands.cpp +++ b/sources/diagramcommands.cpp @@ -220,7 +220,8 @@ void PasteDiagramCommand::redo() { e -> rElementInformations().addValue("comment", ""); //Reset the text field tagged "label - e -> taggedText("label") -> setPlainText("_"); + if (ElementTextItem *eti = e ->taggedText("label")) + eti -> setPlainText("_"); } } }