aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2016-08-17 14:58:40 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2016-08-18 09:21:12 +0000
commit2a4f543ca2b0f90262184fa97f9c386737ec6dd1 (patch)
treef081b3785b51e9a2a39f61b9e16036215ab305e7 /src/qml
parent24e6df252dc6118541d064835cea6ee470985dae (diff)
QML: Do not register dependencies of deleted binding
Because it can lead to a use-after-free. Change-Id: I6701b370c0ecee4967e5f749f673a6f9ee3d504c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/qml/qqmljavascriptexpression.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp
index 5938ebf5d7..cd2f120218 100644
--- a/src/qml/qml/qqmljavascriptexpression.cpp
+++ b/src/qml/qml/qqmljavascriptexpression.cpp
@@ -296,7 +296,7 @@ void QQmlPropertyCapture::registerQmlDependencies(QV4::ExecutionEngine *engine,
if (!ep)
return;
QQmlPropertyCapture *capture = ep->propertyCapture;
- if (!capture)
+ if (!capture || capture->watcher->wasDeleted())
return;
QV4::Scope scope(engine);