wifi: m_phyListener should be null before calling DcfManager::SetupPhyListener

This commit is contained in:
Sébastien Deronne
2018-04-01 10:51:32 +02:00
parent 8bc0849a9b
commit df1aa12ab9

View File

@@ -141,10 +141,7 @@ void
DcfManager::SetupPhyListener (Ptr<WifiPhy> phy)
{
NS_LOG_FUNCTION (this << phy);
if (m_phyListener != 0)
{
delete m_phyListener;
}
NS_ASSERT (m_phyListener == 0);
m_phyListener = new PhyListener (this);
phy->RegisterListener (m_phyListener);
}