From 6dffe61198cdc77bfc464ca15231fd6bedcf8a12 Mon Sep 17 00:00:00 2001 From: SutandoTsukai181 <52977072+SutandoTsukai181@users.noreply.github.com> Date: Wed, 25 Oct 2023 09:07:28 +0300 Subject: [PATCH] Fix null check in PeriodicSender (#140) Null pointer dereference caused by a refactor in a82f2cc45d00f368991b2f4eb8706abd84e246c0 --- model/periodic-sender.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/periodic-sender.cc b/model/periodic-sender.cc index 82b8929efd..0d384c9499 100644 --- a/model/periodic-sender.cc +++ b/model/periodic-sender.cc @@ -135,7 +135,7 @@ PeriodicSender::StartApplication(void) NS_LOG_FUNCTION(this); // Make sure we have a MAC layer - if (m_mac) + if (!m_mac) { // Assumes there's only one device Ptr loraNetDevice = m_node->GetDevice(0)->GetObject();