From a18d005cee03a389d51178da423e46eb70fcbbd2 Mon Sep 17 00:00:00 2001 From: Phil Taylor Date: Sat, 22 May 2021 00:52:01 +0100 Subject: [PATCH] "Hopefully" fix annoying UDP server crash on client disconnect! --- udpserver.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/udpserver.cpp b/udpserver.cpp index 03d174d..cfda49b 100644 --- a/udpserver.cpp +++ b/udpserver.cpp @@ -714,7 +714,9 @@ void udpServer::audioReceived() void udpServer::commonReceived(QList* l,CLIENT* current, QByteArray r) { Q_UNUSED(l); // We might need it later! - + if (current == Q_NULLPTR || r.isNull()) { + return; + } current->lastHeard = QDateTime::currentDateTime(); if (r.length() < 0x10) {