summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativeworkerscript.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml/qdeclarativeworkerscript.cpp')
-rw-r--r--src/declarative/qml/qdeclarativeworkerscript.cpp6
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()