From 6876a6875d95617ea59f59aee5b2b66aef901726 Mon Sep 17 00:00:00 2001 From: Mirko Banchi Date: Thu, 18 Feb 2010 20:40:38 +0100 Subject: [PATCH] [Bug 814] Check if m_low is not zero --- src/devices/wifi/dca-txop.cc | 2 +- src/devices/wifi/edca-txop-n.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/devices/wifi/dca-txop.cc b/src/devices/wifi/dca-txop.cc index 5701e1bc3..1630da924 100644 --- a/src/devices/wifi/dca-txop.cc +++ b/src/devices/wifi/dca-txop.cc @@ -37,7 +37,7 @@ NS_LOG_COMPONENT_DEFINE ("DcaTxop"); #undef NS_LOG_APPEND_CONTEXT -#define NS_LOG_APPEND_CONTEXT std::clog << "[mac=" << m_low->GetAddress () << "] "; +#define NS_LOG_APPEND_CONTEXT if (m_low != 0) {std::clog << "[mac=" << m_low->GetAddress () << "] ";} namespace ns3 { diff --git a/src/devices/wifi/edca-txop-n.cc b/src/devices/wifi/edca-txop-n.cc index f703bc79d..91d9a6f38 100644 --- a/src/devices/wifi/edca-txop-n.cc +++ b/src/devices/wifi/edca-txop-n.cc @@ -38,7 +38,7 @@ NS_LOG_COMPONENT_DEFINE ("EdcaTxopN"); #undef NS_LOG_APPEND_CONTEXT -#define NS_LOG_APPEND_CONTEXT std::clog << "[mac=" << m_low->GetAddress () << "] "; +#define NS_LOG_APPEND_CONTEXT if (m_low != 0) {std::clog << "[mac=" << m_low->GetAddress () << "] ";} namespace ns3 {