diff --git a/src/wifi/model/wifi-tx-vector.cc b/src/wifi/model/wifi-tx-vector.cc index 7e8138179..8c5fa1603 100644 --- a/src/wifi/model/wifi-tx-vector.cc +++ b/src/wifi/model/wifi-tx-vector.cc @@ -523,7 +523,7 @@ WifiTxVector::SetInactiveSubchannels (const std::vector& inactiveSubchanne "Only HE (or later) authorized for preamble puncturing"); NS_ABORT_MSG_IF (m_channelWidth < 80, "Preamble puncturing only possible for transmission bandwidth of 80 MHz or larger"); - NS_ABORT_MSG_IF (inactiveSubchannels.size () != (m_channelWidth / 20), + NS_ABORT_MSG_IF (!inactiveSubchannels.empty () && inactiveSubchannels.size () != (m_channelWidth / 20), "The size of the inactive subchannnels bitmap should be equal to the number of 20 MHz subchannels"); m_inactiveSubchannels = inactiveSubchannels; }