diff --git a/src/drivers/tone_alarm/ToneAlarm.cpp b/src/drivers/tone_alarm/ToneAlarm.cpp index 77e4af3b05b..554fd5ef50c 100644 --- a/src/drivers/tone_alarm/ToneAlarm.cpp +++ b/src/drivers/tone_alarm/ToneAlarm.cpp @@ -51,6 +51,8 @@ ToneAlarm::ToneAlarm() : ToneAlarm::~ToneAlarm() { + // the end of the note would otherwise be called on the deleted driver + hrt_cancel(&_hrt_call); ToneAlarmInterface::stop_note(); }