summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoshyaar <poommetee@protonmail.com>2018-01-01 18:49:03 +0700
committerGitHub <noreply@github.com>2018-01-01 18:49:03 +0700
commit52deb679df547ea9634cf2cc337fa98905bb12fb (patch)
tree141b90ca4c0611be4e7a14720dcb0cc6faa806aa
parent2154f82302a8a5a7b25e5425a9579de692e0726f (diff)
parentd5ed2660781bf1f6b471a0cf9e1a983642658e76 (diff)
downloadredot-engine-52deb679df547ea9634cf2cc337fa98905bb12fb.tar.gz
Merge pull request #15153 from poke1024/fix12112
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() {