mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 09:24:00 +02:00
fix VS crash on domain server restart
This commit is contained in:
parent
c87446c90f
commit
ce41477f46
1 changed files with 16 additions and 0 deletions
|
@ -611,6 +611,22 @@ void VoxelServer::run() {
|
|||
}
|
||||
}
|
||||
qDebug() << "VoxelServer::run()... AFTER loop...\n";
|
||||
|
||||
// walk the node list and disconnect any connected agent nodes
|
||||
for (NodeList::iterator node = nodeList->begin(); node != nodeList->end(); node++) {
|
||||
// only send to the NodeTypes that are NODE_TYPE_VOXEL_SERVER
|
||||
if (node->getType() == NODE_TYPE_AGENT) {
|
||||
node->lock();
|
||||
VoxelNodeData* nodeData = (VoxelNodeData*) node->getLinkedData();
|
||||
if (nodeData) {
|
||||
qDebug() << "VoxelServer::run()... unlinking node...\n";
|
||||
node->setLinkedData(NULL);
|
||||
delete nodeData;
|
||||
}
|
||||
node->unlock();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// call NodeList::clear() so that all of our node specific objects, including our sending threads, are
|
||||
// properly shutdown and cleaned up.
|
||||
|
|
Loading…
Reference in a new issue