diff --git a/src/wifi/model/mac-low.cc b/src/wifi/model/mac-low.cc index 79e8c4ea0..2df755edc 100644 --- a/src/wifi/model/mac-low.cc +++ b/src/wifi/model/mac-low.cc @@ -2847,8 +2847,11 @@ MacLow::AggregateToAmpdu (Ptr packet, const WifiMacHeader hdr) void MacLow::FlushAggregateQueue (void) { - NS_LOG_DEBUG("Flush aggregate queue"); - m_aggregateQueue->Flush (); + if (m_aggregateQueue->GetSize () > 0) + { + NS_LOG_DEBUG("Flush aggregate queue"); + m_aggregateQueue->Flush (); + } m_txPackets.clear (); }