mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 09:23:17 +02:00
Merge pull request #5957 from ZappoMan/fixSentPacketHistoryCrash
fix possible crash from null coming from _sentPackets
This commit is contained in:
commit
b7cfc07748
1 changed files with 5 additions and 1 deletions
|
@ -51,5 +51,9 @@ const NLPacket* SentPacketHistory::getPacket(uint16_t sequenceNumber) const {
|
|||
}
|
||||
|
||||
QReadLocker locker(&_packetsLock);
|
||||
return _sentPackets.get(seqDiff)->get();
|
||||
auto packet = _sentPackets.get(seqDiff);
|
||||
if (packet) {
|
||||
return packet->get();
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue