summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/qml/qdeclarativeworkerscript.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/qml/qdeclarativeworkerscript.cpp b/src/declarative/qml/qdeclarativeworkerscript.cpp
index 10c0b54..a7ed358 100644
--- a/src/declarative/qml/qdeclarativeworkerscript.cpp
+++ b/src/declarative/qml/qdeclarativeworkerscript.cpp
@@ -201,11 +201,11 @@ QScriptValue QDeclarativeWorkerScriptEnginePrivate::sendMessage(QScriptContext *
if (!script)
return engine->undefinedValue();
- p->m_lock.lock();
+ QMutexLocker(&p->m_lock);
+
if (script->owner)
QCoreApplication::postEvent(script->owner,
new WorkerDataEvent(0, scriptValueToVariant(ctxt->argument(0))));
- p->m_lock.unlock();
return engine->undefinedValue();
}