Memleak fix: LocalPlayer object was not deleted
authorLoïc Blot <loic.blot@unix-experience.fr>
Wed, 5 Apr 2017 10:30:52 +0000 (12:30 +0200)
committerLoïc Blot <loic.blot@unix-experience.fr>
Wed, 5 Apr 2017 10:30:52 +0000 (12:30 +0200)
Delete LocalPlayer when ClientEnvironment (object owner) is destroyed

src/clientenvironment.cpp

index 29ecd2dfe97cd71aaa971495fa482bb216c5e13a..94c8e0dcb71f14ecfdaea18c027ba8994a4c8737 100644 (file)
@@ -66,6 +66,8 @@ ClientEnvironment::~ClientEnvironment()
 
        // Drop/delete map
        m_map->drop();
+
+       delete m_local_player;
 }
 
 Map & ClientEnvironment::getMap()