diff options
author | SmallJoker <mk939@ymail.com> | 2021-02-05 18:34:25 +0100 |
---|---|---|
committer | SmallJoker <mk939@ymail.com> | 2021-02-05 18:38:34 +0100 |
commit | d287da184cff737a661a78a2d485b6915316b28b (patch) | |
tree | aaa62f60f949fe023e8f8f831fe6620e3dc2ed2c /src/server.h | |
parent | 9b64834c6a2ae6eb254e486c87864e6116cfafa1 (diff) | |
download | minetest-d287da184cff737a661a78a2d485b6915316b28b.tar.gz minetest-d287da184cff737a661a78a2d485b6915316b28b.tar.bz2 minetest-d287da184cff737a661a78a2d485b6915316b28b.zip |
Server: properly delete ServerMap on interrupted startups
A static mod error (e.g. typo) would abort the initialization but never free ServerMap
Diffstat (limited to 'src/server.h')
-rw-r--r-- | src/server.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server.h b/src/server.h index 0b4084aa9..9857215d0 100644 --- a/src/server.h +++ b/src/server.h @@ -547,6 +547,10 @@ private: // Environment ServerEnvironment *m_env = nullptr; + // Reference to the server map until ServerEnvironment is initialized + // after that this variable must be a nullptr + ServerMap *m_startup_server_map = nullptr; + // server connection std::shared_ptr<con::Connection> m_con; |