From f4d0bdd09a01caf0909f2eba08d93f38fe2850d1 Mon Sep 17 00:00:00 2001 From: James Rowe Date: Thu, 4 Apr 2019 23:51:15 -0600 Subject: [PATCH] Destroy the callback after the stream is destroyed Prevents a crash on close if the callback was running on a different thread. --- src/audio_core/cubeb_sink.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/audio_core/cubeb_sink.cpp b/src/audio_core/cubeb_sink.cpp index a0b0eb944a..6d598cbfb7 100644 --- a/src/audio_core/cubeb_sink.cpp +++ b/src/audio_core/cubeb_sink.cpp @@ -96,8 +96,6 @@ CubebSink::~CubebSink() { return; } - impl->cb = nullptr; - if (cubeb_stream_stop(impl->stream) != CUBEB_OK) { LOG_CRITICAL(Audio_Sink, "Error stopping cubeb stream"); }