History

Update ScriptEngine::stop() to always run on its thread

Ryan Huffman committed 10 years ago

Commit a21e0731 parent e7a15501 file · +4 −0Browse files

Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 1 file). Show all

Unified · Split

libraries/script-engine/src/ScriptEngine.cpp+4−0
@@ -775,6 +775,10 @@ void ScriptEngine::stopAllTimers() { · 774 unmodified lines
775 775
776void ScriptEngine::stop() {776void ScriptEngine::stop() {
777 if (!_isFinished) {777 if (!_isFinished) {
778 if (QThread::currentThread() != thread()) {
779 QMetaObject::invokeMethod(this, "stop");
780 return;
781 }
778 _isFinished = true;782 _isFinished = true;
779 if (_wantSignals) {783 if (_wantSignals) {
780 emit runningStateChanged();784 emit runningStateChanged();