Merge pull request #15589 from endragor/defer-audio-server-destr
Destroy AudioServer after other non-core types are unregistered
This commit is contained in:
commit
2f8701a71a
1 changed files with 5 additions and 5 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue