OSDN Git Service

Memory leak fix for Dynamic Mesh system - the mVertexElements array needs to be delet...
authorryan <>
Mon, 15 Aug 2016 04:53:58 +0000 (04:53 +0000)
committerryan <>
Mon, 15 Aug 2016 04:53:58 +0000 (04:53 +0000)
src/sbs/dynamicmesh.cpp

index 459a6c2..35ce043 100644 (file)
@@ -1171,7 +1171,10 @@ void DynamicMesh::Mesh::UpdateVertices(int client, const std::string &material,
                        count = client_entries[0].vertex_count;
 
                if (count != vertex_count)
+               {
+                       delete [] mVertexElements;
                        return; //make sure vertex count is the same
+               }
        }
 
        Ogre::AxisAlignedBox box;