aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/types/qqmlbind.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/types/qqmlbind.cpp')
-rw-r--r--src/qml/types/qqmlbind.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/types/qqmlbind.cpp b/src/qml/types/qqmlbind.cpp
index 37fa40d993..8e74711776 100644
--- a/src/qml/types/qqmlbind.cpp
+++ b/src/qml/types/qqmlbind.cpp
@@ -492,8 +492,8 @@ void QQmlBind::eval()
//save any set binding for restoration
if (!d->prevBindingSet() && d->v4Value.isEmpty() && !d->prevIsVariant) {
- // try binding first
- d->prevBind = QQmlAnyBinding::ofProperty(d->prop);
+ // try binding first; we need to use takeFrom to properly unlink the binding
+ d->prevBind = QQmlAnyBinding::takeFrom(d->prop);
if (!d->prevBindingSet()) { // nope, try a V4 value next
auto propPriv = QQmlPropertyPrivate::get(d->prop);