From 1ca107a057b13a73deedb741b1fcc67ec7d885d6 Mon Sep 17 00:00:00 2001 From: Marcelo Fernandez Date: Wed, 2 Aug 2017 11:45:19 -0300 Subject: Fix double finalisation of audio drivers --- servers/audio_server.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'servers') diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp index 0d2550e53b..d5f351454d 100644 --- a/servers/audio_server.cpp +++ b/servers/audio_server.cpp @@ -772,10 +772,11 @@ void AudioServer::finish() { buses.clear(); - if (AudioDriver::get_singleton()) { - AudioDriver::get_singleton()->finish(); + for (int i = 0; i < AudioDriverManager::get_driver_count(); i++) { + AudioDriverManager::get_driver(i)->finish(); } } + void AudioServer::update() { } -- cgit v1.2.3