summaryrefslogtreecommitdiff
path: root/main/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main/main.cpp')
-rw-r--r--main/main.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 48537dc3a7..0b231b9d30 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -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();