diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-03-30 05:25:01 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-03-30 06:04:07 (GMT) |
commit | 2661be1bacdd83d1b3e6207c519c2699edfdc1d0 (patch) | |
tree | f030a26c2e9641d0a16aa429ee07ad1b5ad7a490 /src/declarative/qml | |
parent | 859304f5a8d9169a3f2f30e013d460b0e93c118f (diff) | |
download | Qt-2661be1bacdd83d1b3e6207c519c2699edfdc1d0.zip Qt-2661be1bacdd83d1b3e6207c519c2699edfdc1d0.tar.gz Qt-2661be1bacdd83d1b3e6207c519c2699edfdc1d0.tar.bz2 |
WorkerScript was receiving events after deletion and trying to process
these events.
Diffstat (limited to 'src/declarative/qml')
-rw-r--r-- | src/declarative/qml/qdeclarativeworkerscript.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativeworkerscript.cpp b/src/declarative/qml/qdeclarativeworkerscript.cpp index a7ed358..628681f 100644 --- a/src/declarative/qml/qdeclarativeworkerscript.cpp +++ b/src/declarative/qml/qdeclarativeworkerscript.cpp @@ -437,8 +437,12 @@ QDeclarativeWorkerScriptEngine::QDeclarativeWorkerScriptEngine(QDeclarativeEngin QDeclarativeWorkerScriptEngine::~QDeclarativeWorkerScriptEngine() { + d->m_lock.lock(); qDeleteAll(d->workers); - delete d; d = 0; + d->workers.clear(); + d->m_lock.unlock(); + + d->deleteLater(); } QDeclarativeWorkerScriptEnginePrivate::WorkerScript::WorkerScript() |