mirror of
https://github.com/minetest/minetest.git
synced 2025-01-03 03:47:31 +01:00
Apply some fixes to server destruction order
was broken by bc4ab8b99e8a9530f2a53152ff03608e278b4351
This commit is contained in:
parent
d6da80fe24
commit
9e14f5f053
@ -393,6 +393,10 @@ Server::~Server()
|
||||
infostream << "Server: Saving environment metadata" << std::endl;
|
||||
m_env->saveMeta();
|
||||
|
||||
// Delete classes that depend on the environment
|
||||
m_inventory_mgr.reset();
|
||||
m_script.reset();
|
||||
|
||||
// Note that this also deletes and saves the map.
|
||||
delete m_env;
|
||||
m_env = nullptr;
|
||||
@ -409,6 +413,9 @@ Server::~Server()
|
||||
}
|
||||
}
|
||||
|
||||
// emerge may depend on definition managers, so destroy first
|
||||
m_emerge.reset();
|
||||
|
||||
// Delete the rest in the reverse order of creation
|
||||
delete m_game_settings;
|
||||
delete m_banmanager;
|
||||
|
Loading…
Reference in New Issue
Block a user