From 7270ab90782de3d24118e2692b46dc7f9033e73f Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Wed, 27 Jun 2018 16:46:45 -0700 Subject: [PATCH] Create and destroy ScriptModel on its owning thread QFileSystemWatcher, a component, must be destroyed on the thread that created it. --- assignment-client/src/scripts/EntityScriptServer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assignment-client/src/scripts/EntityScriptServer.cpp b/assignment-client/src/scripts/EntityScriptServer.cpp index eea8e8b470..455c726611 100644 --- a/assignment-client/src/scripts/EntityScriptServer.cpp +++ b/assignment-client/src/scripts/EntityScriptServer.cpp @@ -68,9 +68,6 @@ EntityScriptServer::EntityScriptServer(ReceivedMessage& message) : ThreadedAssig DependencyManager::set(); DependencyManager::set(); - DependencyManager::set(ScriptEngine::ENTITY_SERVER_SCRIPT); - - DependencyManager::set(); // Needed to ensure the creation of the DebugDraw instance on the main thread @@ -253,6 +250,9 @@ void EntityScriptServer::handleEntityScriptCallMethodPacket(QSharedPointer(ScriptEngine::ENTITY_SERVER_SCRIPT); + DependencyManager::set(); + // make sure we request our script once the agent connects to the domain auto nodeList = DependencyManager::get();