diff --git a/Telegram/SourceFiles/media/media_audio.cpp b/Telegram/SourceFiles/media/media_audio.cpp index c0e1e9778..fc50b43cb 100644 --- a/Telegram/SourceFiles/media/media_audio.cpp +++ b/Telegram/SourceFiles/media/media_audio.cpp @@ -194,7 +194,9 @@ void Start() { void Finish() { Platform::Audio::DeInit(); - delete base::take(MixerInstance); + // MixerInstance variable should be modified under AudioMutex protection. + // So it is modified in the ~Mixer() destructor after all tracks are cleared. + delete MixerInstance; // No sync required already. ClosePlaybackDevice();