aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Hartmann <thomas.hartmann@qt.io>2022-10-18 17:31:06 +0200
committerThomas Hartmann <thomas.hartmann@qt.io>2022-10-19 09:45:51 +0000
commit5ca3db5ff7a76a5aed1e5817853d13e14ebb9d3c (patch)
treee162877351cfc690d7ef39adbdc8ee51813b52a2
parent1523129d50c5c7b7fc9c8b142a34f60f01a99f67 (diff)
QmlDesigner: Fix crash
We access the rewriterView() for the decription. Change-Id: I30883d02ab1a2b12dcd6a2bcac6fae82b97a2f5b Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
-rw-r--r--src/plugins/qmldesigner/designercore/model/model.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/qmldesigner/designercore/model/model.cpp b/src/plugins/qmldesigner/designercore/model/model.cpp
index a1855f0b65..3501ab431a 100644
--- a/src/plugins/qmldesigner/designercore/model/model.cpp
+++ b/src/plugins/qmldesigner/designercore/model/model.cpp
@@ -726,10 +726,15 @@ void ModelPrivate::setAuxiliaryData(const InternalNodePointer &node,
void ModelPrivate::resetModelByRewriter(const QString &description)
{
- if (rewriterView())
+ if (rewriterView()) {
rewriterView()->resetToLastCorrectQml();
- throw RewritingException(__LINE__, __FUNCTION__, __FILE__, description.toUtf8(), rewriterView()->textModifierContent());
+ throw RewritingException(__LINE__,
+ __FUNCTION__,
+ __FILE__,
+ description.toUtf8(),
+ rewriterView()->textModifierContent());
+ }
}
void ModelPrivate::attachView(AbstractView *view)