diff options
author | Jedrzej Nowacki <jedrzej.nowacki@nokia.com> | 2009-08-12 12:07:51 (GMT) |
---|---|---|
committer | Jedrzej Nowacki <jedrzej.nowacki@nokia.com> | 2009-08-12 12:25:41 (GMT) |
commit | 8eeeebafaa66843eb17fc0d0e60154b1de07e183 (patch) | |
tree | ca4f7486eae29ced64fffed5cd3535fb148e44ee /src/script/api | |
parent | 61f454dd144590025d9001b669b102528782bfeb (diff) | |
download | Qt-8eeeebafaa66843eb17fc0d0e60154b1de07e183.zip Qt-8eeeebafaa66843eb17fc0d0e60154b1de07e183.tar.gz Qt-8eeeebafaa66843eb17fc0d0e60154b1de07e183.tar.bz2 |
Crash fix.
Fix GetSetAgent() in tst_qscriptengine.
Reviewed-by: TrustMe
Diffstat (limited to 'src/script/api')
-rw-r--r-- | src/script/api/qscriptengine.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index dfdfdac..8cab92c 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -3533,7 +3533,8 @@ void QScriptEngine::setAgent(QScriptEngineAgent *agent) if (d->agent) QScriptEngineAgentPrivate::get(d->agent)->detach(); d->agent = agent; - QScriptEngineAgentPrivate::get(d->agent)->attach(); + if (agent) + QScriptEngineAgentPrivate::get(d->agent)->attach(); } /*! |