Check if packet is not released before CC to phone

pull/3787/head
GUVWAF 2024-05-05 13:49:50 +02:00
rodzic 70712d859c
commit 6fb7d7f2d7
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -257,7 +257,7 @@ void MeshService::sendToMesh(meshtastic_MeshPacket *p, RxSource src, bool ccToPh
LOG_DEBUG("Can't send status to phone");
}
if (ccToPhone) {
if (res == ERRNO_OK && ccToPhone) { // Check if p is not released in case it couldn't be sent
sendToPhone(packetPool.allocCopy(*p));
}
}