Fix bug in OctreeInboundPacketProcessor where node can be null

This commit is contained in:
Ryan Huffman 2015-10-08 17:35:48 -07:00
parent e2e086ef55
commit f1babb7fa0

View file

@ -261,6 +261,12 @@ int OctreeInboundPacketProcessor::sendNackPackets() {
}
const SharedNodePointer& destinationNode = DependencyManager::get<NodeList>()->nodeWithUUID(nodeUUID);
// If the node no longer exists, wait until the ReceivedPacketProcessor has cleaned up the node
// to remove it from our stats list.
// FIXME Is it safe to clean it up here before ReceivedPacketProcess has?
if (!destinationNode) {
continue;
}
// retrieve sequence number stats of node, prune its missing set
SequenceNumberStats& sequenceNumberStats = nodeStats.getIncomingEditSequenceNumberStats();