Showing the changes to libraries/script-engine/src/ScriptManager.cpp (1 of 1 file). Show all
Unified · Split
| @@ -2498,11 +2498,10 @@ void ScriptManager::unloadAllEntityScripts(bool blockingCall) { · 2497 unmodified lines | ||
| 2498 | 2498 | #ifdef THREAD_DEBUGGING |
| 2499 | 2499 | qCDebug(scriptengine) << "*** WARNING *** ScriptManager::unloadAllEntityScripts() called on wrong thread [" << QThread::currentThread() << "], invoking on correct thread [" << thread() << "]"; |
| 2500 | 2500 | #endif |
| 2501 | − | |
| 2502 | 2501 | // Lambda is necessary there to keep shared_ptr counter above zero |
| 2503 | − QMetaObject::invokeMethod(this, [=, manager = shared_from_this()]{ | |
| 2504 | − manager->unloadAllEntityScripts(blockingCall ? Qt::BlockingQueuedConnection : Qt::QueuedConnection); | |
| 2505 | − }); | |
| 2502 | + QMetaObject::invokeMethod(this, [=, manager = shared_from_this()] { | |
| 2503 | + manager->unloadAllEntityScripts(blockingCall); | |
| 2504 | + }, blockingCall ? Qt::BlockingQueuedConnection : Qt::QueuedConnection); | |
| 2506 | 2505 | return; |
| 2507 | 2506 | } |
| 2508 | 2507 | #ifdef THREAD_DEBUGGING |