Merge pull request #15589 from endragor/defer-audio-server-destr

Destroy AudioServer after other non-core types are unregistered
This commit is contained in:
Rémi Verschelde 2018-01-11 15:33:05 +01:00 committed by GitHub
commit 2f8701a71a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1845,11 +1845,6 @@ void Main::cleanup() {
EditorNode::unregister_editor_types();
#endif
if (audio_server) {
audio_server->finish();
memdelete(audio_server);
}
if (arvr_server) {
// cleanup now before we pull the rug from underneath...
memdelete(arvr_server);
@ -1861,6 +1856,11 @@ void Main::cleanup() {
unregister_scene_types();
unregister_server_types();
if (audio_server) {
audio_server->finish();
memdelete(audio_server);
}
OS::get_singleton()->finalize();
finalize_physics();