From d5ed2660781bf1f6b471a0cf9e1a983642658e76 Mon Sep 17 00:00:00 2001 From: Bernhard Liebl Date: Fri, 29 Dec 2017 11:22:56 +0100 Subject: [PATCH] Delete AudioServer buses after driver shutdown --- servers/audio_server.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp index a08733de879..8b14a5a8a73 100644 --- a/servers/audio_server.cpp +++ b/servers/audio_server.cpp @@ -892,15 +892,15 @@ void AudioServer::load_default_bus_layout() { void AudioServer::finish() { + for (int i = 0; i < AudioDriverManager::get_driver_count(); i++) { + AudioDriverManager::get_driver(i)->finish(); + } + for (int i = 0; i < buses.size(); i++) { memdelete(buses[i]); } buses.clear(); - - for (int i = 0; i < AudioDriverManager::get_driver_count(); i++) { - AudioDriverManager::get_driver(i)->finish(); - } } void AudioServer::update() {