aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoïc Blot <loic.blot@unix-experience.fr>2017-04-05 12:30:52 +0200
committerLoïc Blot <loic.blot@unix-experience.fr>2017-04-05 12:30:52 +0200
commit54ffc4e915fcdb6f6e7556bc2d1f8b27fd567d9f (patch)
treebf900cd50288a2fb16e1aa1ddf84894493629387
parent460e094a9fbfe589d138c71f12a8bb87627d7a94 (diff)
downloadminetest-54ffc4e915fcdb6f6e7556bc2d1f8b27fd567d9f.tar.gz
minetest-54ffc4e915fcdb6f6e7556bc2d1f8b27fd567d9f.tar.bz2
minetest-54ffc4e915fcdb6f6e7556bc2d1f8b27fd567d9f.zip
Memleak fix: LocalPlayer object was not deleted
Delete LocalPlayer when ClientEnvironment (object owner) is destroyed
-rw-r--r--src/clientenvironment.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/clientenvironment.cpp b/src/clientenvironment.cpp
index 29ecd2dfe..94c8e0dcb 100644
--- a/src/clientenvironment.cpp
+++ b/src/clientenvironment.cpp
@@ -66,6 +66,8 @@ ClientEnvironment::~ClientEnvironment()
// Drop/delete map
m_map->drop();
+
+ delete m_local_player;
}
Map & ClientEnvironment::getMap()