mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-28 03:19:54 +02:00
Check entities scripting thread before signaling it
This commit is contained in:
parent
699c717828
commit
1e710712cc
2 changed files with 5 additions and 3 deletions
|
@ -71,8 +71,8 @@ EntityTreeRenderer::EntityTreeRenderer(bool wantScripts, AbstractViewStateInterf
|
|||
}
|
||||
|
||||
EntityTreeRenderer::~EntityTreeRenderer() {
|
||||
// NOTE: we don't need to delete _entitiesScriptEngine because it is registered with the application and has a
|
||||
// signal tied to call it's deleteLater on doneRunning
|
||||
// NOTE: We don't need to delete _entitiesScriptEngine because
|
||||
// it is registered with ScriptEngines, which will call deleteLater for us.
|
||||
}
|
||||
|
||||
void EntityTreeRenderer::clear() {
|
||||
|
|
|
@ -154,7 +154,9 @@ ScriptEngine::~ScriptEngine() {
|
|||
|
||||
void ScriptEngine::disconnectNonEssentialSignals() {
|
||||
disconnect();
|
||||
connect(this, &ScriptEngine::doneRunning, thread(), &QThread::quit);
|
||||
if (_isRunning && _isThreaded) { // ensure the thread is running
|
||||
connect(this, &ScriptEngine::doneRunning, thread(), &QThread::quit);
|
||||
}
|
||||
}
|
||||
|
||||
void ScriptEngine::runInThread() {
|
||||
|
|
Loading…
Reference in a new issue