diff options
author | Thomas Hartmann <Thomas.Hartmann@nokia.com> | 2011-04-18 10:26:52 +0200 |
---|---|---|
committer | Thomas Hartmann <Thomas.Hartmann@nokia.com> | 2011-04-18 10:28:07 +0200 |
commit | cf0d90f88e1bded84f454a1e8a0379a2836263a6 (patch) | |
tree | 6bcc06887c55fe9961c65fb64e95a74541ddb575 | |
parent | 5515703dc3cf7445225837f283efdbb070d1054c (diff) |
QmlDesigner.propertyEditor: crash fix
Setting an empty expression on a value not defined in the model
crashed.
Task-number: QTCREATORBUG-4312
-rw-r--r-- | src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp index eb18766cf45..a6fff788f47 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp @@ -511,6 +511,9 @@ void PropertyEditor::changeExpression(const QString &name) return; } + if (value->expression().isEmpty()) + return; + if (fxObjectNode.expression(name) != value->expression() || !fxObjectNode.propertyAffectedByCurrentState(name)) fxObjectNode.setBindingProperty(name, value->expression()); |