From 2e582c3fa1adc37954378acf006f52ff23e25689 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann <Thomas.Hartmann@nokia.com> Date: Thu, 25 Mar 2010 14:37:18 +0100 Subject: [PATCH] QmlDesigner.propertyEditor: crash fix processEvents() might lead to an invalid fxObjectNode --- .../qmldesigner/components/propertyeditor/propertyeditor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp index 242fd12dbda..3d27ac07a20 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp @@ -197,6 +197,8 @@ void PropertyEditor::NodeType::setup(const QmlObjectNode &fxObjectNode, const QS QApplication::processEvents(); ctxt->setContextProperty("stateName", QVariant(stateName)); QApplication::processEvents(); + if (!fxObjectNode.isValid()) + return; ctxt->setContextProperty("propertyCount", QVariant(fxObjectNode.modelNode().properties().count())); ctxt->setContextProperty("isBaseState", QVariant(fxObjectNode.isInBaseState())); ctxt->setContextProperty("selectionChanged", QVariant(false)); -- GitLab