From 02eeac9ea598ab91cfd6388fef91b00ac243bb35 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Mon, 6 May 2024 14:34:16 +0200 Subject: [PATCH] audio: unregister callback This caused occasional crashes on M1 Mac Pro with `uv --capabilities` (also in macos-14 arm64 GH runner). This was most likely caused by the callback being run just after the audio state has been destroyed. --- src/audio/audio.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/audio/audio.cpp b/src/audio/audio.cpp index 5e1d4f946..c4d992be6 100644 --- a/src/audio/audio.cpp +++ b/src/audio/audio.cpp @@ -561,6 +561,9 @@ void audio_done(struct state_audio *s) audio_codec_done(s->audio_encoder); + unregister_should_exit_callback(get_root_module(s->mod.get()), + should_exit_audio, s); + delete s; }