Showing the changes to assignment-client/src/scripts/EntityScriptServer.cpp (1 of 1 file). Show all
Unified · Split
| @@ -566,8 +566,15 @@ void EntityScriptServer::handleOctreePacket(QSharedPointer<ReceivedMessage> mess · 565 unmodified lines | |||
| 566 | void EntityScriptServer::aboutToFinish() { | 566 | void EntityScriptServer::aboutToFinish() { |
| 567 | shutdownScriptEngine(); | 567 | shutdownScriptEngine(); |
| 568 | 568 | ||
| 569 | auto entityScriptingInterface = DependencyManager::get<EntityScriptingInterface>(); | ||
| 569 | // our entity tree is going to go away so tell that to the EntityScriptingInterface | 570 | // our entity tree is going to go away so tell that to the EntityScriptingInterface |
| 570 | DependencyManager::get<EntityScriptingInterface>()->setEntityTree(nullptr); | 571 | entityScriptingInterface->setEntityTree(nullptr); |
| 572 | |||
| 573 | // Should always be true as they are singletons. | ||
| 574 | if (entityScriptingInterface->getPacketSender() == &_entityEditSender) { | ||
| 575 | // The packet sender is about to go away. | ||
| 576 | entityScriptingInterface->setPacketSender(nullptr); | ||
| 577 | } | ||
| 571 | 578 | ||
| 572 | DependencyManager::get<ResourceManager>()->cleanup(); | 579 | DependencyManager::get<ResourceManager>()->cleanup(); |
| 573 | 580 | ||