diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-01-19 08:02:40 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-01-19 08:02:40 (GMT) |
commit | 530fd3831f012337d7460c4387ce82083ab3e144 (patch) | |
tree | 5982ace32770fe05e5357b28099f3971f454b69f /src/script | |
parent | 630114a8c65e492b7b9008e056895302865ba528 (diff) | |
parent | 3cb3c9a7922cd96744ff0e15790103dbb68b3bf9 (diff) | |
download | Qt-530fd3831f012337d7460c4387ce82083ab3e144.zip Qt-530fd3831f012337d7460c4387ce82083ab3e144.tar.gz Qt-530fd3831f012337d7460c4387ce82083ab3e144.tar.bz2 |
Merge branch '4.6' of ../qt into kinetic-declarativeui
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/bridge/qscriptqobject.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp index fb0dddb..3f4f6bb 100644 --- a/src/script/bridge/qscriptqobject.cpp +++ b/src/script/bridge/qscriptqobject.cpp @@ -978,7 +978,8 @@ JSC::JSValue QtFunction::execute(JSC::ExecState *exec, JSC::JSValue thisValue, QScriptObjectDelegate *delegate = scriptObject->delegate(); Q_ASSERT(delegate && (delegate->type() == QScriptObjectDelegate::QtObject)); QObject *qobj = static_cast<QScript::QObjectDelegate*>(delegate)->value(); - Q_ASSERT_X(qobj != 0, "QtFunction::call", "handle the case when QObject has been deleted"); + if (!qobj) + return JSC::throwError(exec, JSC::GeneralError, QString::fromLatin1("cannot call function of deleted QObject")); QScriptEnginePrivate *engine = scriptEngineFromExec(exec); const QMetaObject *meta = qobj->metaObject(); |