Browse Source

[3.x] Move navigation server finalize before physics server

Moves finalize_navigation_server() before physics server (and also OS in 3.x). The NavigationServer command queue can have objects from other servers like physics or visuals so it needs to be flushed before.
smix8 2 years ago
parent
commit
8e4f8c82c5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      main/main.cpp

+ 1 - 1
main/main.cpp

@@ -2530,9 +2530,9 @@ void Main::cleanup(bool p_force) {
 		memdelete(camera_server);
 		memdelete(camera_server);
 	}
 	}
 
 
+	finalize_navigation_server();
 	OS::get_singleton()->finalize();
 	OS::get_singleton()->finalize();
 	finalize_physics();
 	finalize_physics();
-	finalize_navigation_server();
 
 
 	if (packed_data) {
 	if (packed_data) {
 		memdelete(packed_data);
 		memdelete(packed_data);