mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Update ScriptEngine::stop() to always run on its thread
This commit is contained in:
parent
e7a1550b64
commit
a21e07327d
1 changed files with 4 additions and 0 deletions
|
@ -775,6 +775,10 @@ void ScriptEngine::stopAllTimers() {
|
||||||
|
|
||||||
void ScriptEngine::stop() {
|
void ScriptEngine::stop() {
|
||||||
if (!_isFinished) {
|
if (!_isFinished) {
|
||||||
|
if (QThread::currentThread() != thread()) {
|
||||||
|
QMetaObject::invokeMethod(this, "stop");
|
||||||
|
return;
|
||||||
|
}
|
||||||
_isFinished = true;
|
_isFinished = true;
|
||||||
if (_wantSignals) {
|
if (_wantSignals) {
|
||||||
emit runningStateChanged();
|
emit runningStateChanged();
|
||||||
|
|
Loading…
Reference in a new issue