Bug 340

Summary: OnOff crashes if Stop() is called without Start() having been called before
Product: ns-3 Reporter: Gustavo J. A. M. Carneiro <gjcarneiro>
Component: applicationsAssignee: Rajib Bhattacharjea <raj.b>
Status: RESOLVED FIXED    
Severity: minor CC: ns-bugs
Priority: P3    
Version: ns-3.2   
Hardware: All   
OS: All   

Description Gustavo J. A. M. Carneiro 2008-09-12 13:52:36 UTC
145	void OnOffApplication::StopApplication() // Called at time specified by Stop
146	{
147	  NS_LOG_FUNCTION_NOARGS ();
148	
149	  CancelEvents ();
150	  m_socket->Close ();
151	}

If the application hasn't started, m_socket is NULL.  Maybe it's better to add an assert, not sure.
Comment 1 Mathieu Lacage 2008-10-20 08:19:32 UTC
it seems that we can trivially check for m_socket != 0
Comment 2 Rajib Bhattacharjea 2008-10-27 15:13:17 UTC
changeset 3819	37b316422064