Commit bffeb830 authored by Kai Koehne's avatar Kai Koehne
Browse files

QmlDesigner: Fix crash when changing a binding

Regression introduced by ed31fdd2
parent cfa82fc9
......@@ -408,7 +408,8 @@ void ObjectNodeInstance::setPropertyBinding(const QString &name, const QString &
binding->setTarget(metaProperty);
binding->setNotifyOnValueChanged(true);
QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::setBinding(metaProperty, binding);
oldBinding->destroy();
if (oldBinding)
oldBinding->destroy();
binding->update();
} else {
qWarning() << "Cannot set binding for property" << name << ": property is unknown for type"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment