unregister the AvatarHashMap packet registrations

This commit is contained in:
Stephen Birarda 2015-07-16 17:55:29 -07:00
parent 040c7557da
commit e7249594e1

View file

@ -193,6 +193,9 @@ void Agent::run() {
void Agent::aboutToFinish() {
_scriptEngine.stop();
auto& packetReceiver = DependencyManager::get<NodeList>()->getPacketReceiver();
packetReceiver.unregisterListener(DependencyManager::get<AvatarHashMap>().data());
// our entity tree is going to go away so tell that to the EntityScriptingInterface
DependencyManager::get<EntityScriptingInterface>()->setEntityTree(NULL);