Skip to content

mobility: cancel update event in RandomWaypointMobilityModel when the model is destroyed

Tommaso Pecorella requested to merge tommypec/ns-3-dev:mobilityFix into master

This bug was found by Alyaa Al_mula in the user group. Destroying the RandomWaypointMobilityModel mid-simulation (e.g., because you did change the mobility model) does not stop its periodic event - leading to segmentation fault.

Simple fix: use DoDispose to cancel the event.

Merge request reports