mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 23:09:52 +02:00
Merge pull request #3938 from ZappoMan/fixcrash
potential fix to crash on windows startup
This commit is contained in:
commit
8d88c537bf
1 changed files with 3 additions and 1 deletions
|
@ -44,7 +44,9 @@ bool ReceivedPacketProcessor::process() {
|
||||||
NetworkPacket& packet = _packets.front(); // get the oldest packet
|
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
|
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
|
_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
|
unlock(); // let others add to the packets
|
||||||
processPacket(temporary.getNode(), temporary.getByteArray()); // process our temporary copy
|
processPacket(temporary.getNode(), temporary.getByteArray()); // process our temporary copy
|
||||||
midProcess();
|
midProcess();
|
||||||
|
|
Loading…
Reference in a new issue