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)
This commit is contained in:
Thomas Hartmann
2023-09-19 14:22:19 +02:00
parent 50317b4b13
commit cc44c9cd65

View File

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