From 6fb7d7f2d7980a298d6d2b129a50a022058a76d2 Mon Sep 17 00:00:00 2001 From: GUVWAF Date: Sun, 5 May 2024 13:49:50 +0200 Subject: [PATCH] Check if packet is not released before CC to phone --- src/mesh/MeshService.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesh/MeshService.cpp b/src/mesh/MeshService.cpp index ddad211a6..2cfb4843c 100644 --- a/src/mesh/MeshService.cpp +++ b/src/mesh/MeshService.cpp @@ -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)); } }