Merge pull request #15153 from poke1024/fix12112

Delete AudioServer buses after driver shutdown
This commit is contained in:
Noshyaar 2018-01-01 18:49:03 +07:00 committed by GitHub
commit 52deb679df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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() {