diff --git a/packettypes.h b/packettypes.h index ef471e6..23ce742 100644 --- a/packettypes.h +++ b/packettypes.h @@ -15,7 +15,7 @@ #define LOCK_PERIOD 10 // How long to try to lock mutex (ms) #define STALE_CONNECTION 15 // Not heard from in this many seconds #define BUFSIZE 500 // Number of packets to buffer -#define MAX_MISSING 400 // Make the maximum number of possible missing packets less than total buffer size! +#define MAX_MISSING 100 // Make the maximum number of possible missing packets much less than total buffer size! #define TXAUDIO_PERIOD 20 diff --git a/udpserver.cpp b/udpserver.cpp index a79c4ee..09a89af 100644 --- a/udpserver.cpp +++ b/udpserver.cpp @@ -1709,7 +1709,7 @@ void udpServer::sendRetransmitRequest(CLIENT* c) { for (auto it = c->rxMissing.begin(); it != c->rxMissing.end(); ++it) { - if (it.value() < 4) + if (&it != Q_NULLPTR && it.value() < 4) { missingSeqs.append(it.key() & 0xff); missingSeqs.append(it.key() >> 8 & 0xff);