From ff9a03b1092675a4ea82a62d6af1c24fa847bd08 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Thu, 31 Mar 2011 11:13:51 +0200 Subject: [PATCH] QmlDesigner.propertyEditor: crash fix The stack trace from 4282 indicates that in fact currentState is invalid. We should check for this. Reviewed-by: Kai Koehne Task-number: QTCREATORBUG-4282 --- .../components/propertyeditor/propertyeditorvalue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp index df547f031f..00b427bae7 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp @@ -156,7 +156,7 @@ void PropertyEditorValue::setExpression(const QString &expression) bool PropertyEditorValue::isInSubState() const { const QmlDesigner::QmlObjectNode objectNode(modelNode()); - return objectNode.isValid() && objectNode.propertyAffectedByCurrentState(name()); + return objectNode.isValid() && objectNode.currentState().isValid() && objectNode.propertyAffectedByCurrentState(name()); } bool PropertyEditorValue::isBound() const -- GitLab