|
Bugzilla – Full Text Bug Listing |
| Summary: | OnOff crashes if Stop() is called without Start() having been called before | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Gustavo J. A. M. Carneiro <gjcarneiro> |
| Component: | applications | Assignee: | Rajib Bhattacharjea <raj.b> |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | CC: | ns-bugs |
| Priority: | P3 | ||
| Version: | ns-3.2 | ||
| Hardware: | All | ||
| OS: | All | ||
it seems that we can trivially check for m_socket != 0 changeset 3819 37b316422064 |
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.