diff options
author | Thomas Hartmann <thomas.hartmann@qt.io> | 2023-09-19 14:22:19 +0200 |
---|---|---|
committer | Thomas Hartmann <thomas.hartmann@qt.io> | 2023-09-22 09:40:23 +0000 |
commit | cc44c9cd65cb3d9cd969e9d308d83842f8fbb5d5 (patch) | |
tree | 7c095116bfaf99ef5501d8eee5ed73bcb51c5c0a | |
parent | 50317b4b13582a7826393a066a0140a0efbf03ee (diff) |
QmlDesigner: Fix potential crash
The view is not guranteed to be attached. In my case I closed the project
and for now the dialog is not closed automatically in this case.
Change-Id: If006fae2ddd78d6eefe604f6b0c44eb9e1fb725a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
(cherry picked from commit cbd2a08194b6568a7bc347d1aef6795d5d9405be)
-rw-r--r-- | src/plugins/qmldesigner/components/connectioneditor/bindingmodel.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/qmldesigner/components/connectioneditor/bindingmodel.cpp b/src/plugins/qmldesigner/components/connectioneditor/bindingmodel.cpp index cc73f4b20a..8ba1347bbf 100644 --- a/src/plugins/qmldesigner/components/connectioneditor/bindingmodel.cpp +++ b/src/plugins/qmldesigner/components/connectioneditor/bindingmodel.cpp @@ -330,6 +330,7 @@ void BindingModelBackendDelegate::sourceNodeChanged() ConnectionView *view = model->connectionView(); QTC_ASSERT(view, return); + QTC_ASSERT(view->isAttached(), return ); const QString sourceNode = m_sourceNode.currentText(); const QString sourceProperty = m_sourceNodeProperty.currentText(); |