summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-08-19 14:51:43 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-08-19 14:52:55 (GMT)
commit3f9a1230e32cb43d61c8d42c9bcb2beb322f6583 (patch)
tree907b9134b89f4934a3980747f598827ac194c517 /src
parent7ae701ff4759bdfd12953c6f4d785c2d9241690f (diff)
downloadQt-3f9a1230e32cb43d61c8d42c9bcb2beb322f6583.zip
Qt-3f9a1230e32cb43d61c8d42c9bcb2beb322f6583.tar.gz
Qt-3f9a1230e32cb43d61c8d42c9bcb2beb322f6583.tar.bz2
invalidate wrapped JSC::JSValue when script engine is deleted
Otherwise we will crash if someone tries to do something with the value.
Diffstat (limited to 'src')
-rw-r--r--src/script/api/qscriptvalue_p.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/script/api/qscriptvalue_p.h b/src/script/api/qscriptvalue_p.h
index 7c1d538..71bff07 100644
--- a/src/script/api/qscriptvalue_p.h
+++ b/src/script/api/qscriptvalue_p.h
@@ -144,8 +144,11 @@ public:
{
// if type is not developed in js engine there is no
// need to invalidate the object
- if (isJSC()) valid=false;
- engine=0;
+ if (isJSC()) {
+ valid = false;
+ jscValue = JSC::JSValue();
+ }
+ engine = 0;
}
qint64 objectId()