aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Ogilvie <colin.ogilvie@kdab.com>2017-06-02 11:37:09 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2017-07-27 12:37:06 +0000
commitbd5345637453697269bb20bd8d25128432ea8265 (patch)
tree83dc682323f976e78c2cd6b1dbdffc716f5aa9b7
parentcaa273e3bc6a2bece76c190b4135103eb7bbeab9 (diff)
Don't leak QQmlJavaScriptExpression errors
Ensure any error is deleted when the expression is Change-Id: Ibbfd28f50279d4c66830b40c5c917eb8d98f266e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> (cherry picked from commit 1e0685136d0debb2a3b62d9f4650c95afe41913b)
-rw-r--r--src/qml/qml/qqmljavascriptexpression.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp
index cd2f120218..1c4890aaa8 100644
--- a/src/qml/qml/qqmljavascriptexpression.cpp
+++ b/src/qml/qml/qqmljavascriptexpression.cpp
@@ -100,6 +100,7 @@ QQmlJavaScriptExpression::~QQmlJavaScriptExpression()
}
clearGuards();
+ clearError();
if (m_scopeObject.isT2()) // notify DeleteWatcher of our deletion.
m_scopeObject.asT2()->_s = 0;
}