Merge pull request #3938 from ZappoMan/fixcrash

potential fix to crash on windows startup
This commit is contained in:
Leonardo Murillo 2014-12-09 19:12:53 -08:00
commit 8d88c537bf

View file

@ -44,7 +44,9 @@ bool ReceivedPacketProcessor::process() {
NetworkPacket& packet = _packets.front(); // get the oldest packet
NetworkPacket temporary = packet; // make a copy of the packet in case the vector is resized on us
_packets.erase(_packets.begin()); // remove the oldest packet
_nodePacketCounts[temporary.getNode()->getUUID()]--;
if (!temporary.getNode().isNull()) {
_nodePacketCounts[temporary.getNode()->getUUID()]--;
}
unlock(); // let others add to the packets
processPacket(temporary.getNode(), temporary.getByteArray()); // process our temporary copy
midProcess();