summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Liebl <Bernhard.Liebl@gmx.org>2017-12-29 11:22:56 +0100
committerBernhard Liebl <Bernhard.Liebl@gmx.org>2017-12-29 11:22:56 +0100
commitd5ed2660781bf1f6b471a0cf9e1a983642658e76 (patch)
tree32d9e98538f4740c91a69ae9963cf3d6c6a9da8d
parentf11a1385054376bdc4cc01e6aa20d63508a5e6d4 (diff)
Delete AudioServer buses after driver shutdown
-rw-r--r--servers/audio_server.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp
index a08733de87..8b14a5a8a7 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() {