diff --git a/core/backends/lan/lanlinkprovider.cpp b/core/backends/lan/lanlinkprovider.cpp index 77a50d3d2..6b768f5fd 100644 --- a/core/backends/lan/lanlinkprovider.cpp +++ b/core/backends/lan/lanlinkprovider.cpp @@ -183,7 +183,14 @@ void LanLinkProvider::newUdpConnection() //udpBroadcastReceived //qCDebug(KDECONNECT_CORE) << "Datagram " << datagram.data() ; - if (!success || receivedPacket->type() != PACKET_TYPE_IDENTITY) { + if (!success) { + qCDebug(KDECONNECT_CORE) << "Could not unserialize UDP packet"; + delete receivedPacket; + continue; + } + + if (receivedPacket->type() != PACKET_TYPE_IDENTITY) { + qCDebug(KDECONNECT_CORE) << "Received a UDP packet of wrong type" << receivedPacket->type(); delete receivedPacket; continue; }