Commit e35c3430 authored by Joseph Mirabel's avatar Joseph Mirabel
Browse files

Fix memory leak

parent 35d3109b
......@@ -63,6 +63,7 @@ Convex<PolygonT>::Convex(const Convex<PolygonT>& other) :
num_polygons (other.num_polygons)
{
if (own_storage_) {
delete [] polygons;
polygons = new PolygonT[num_polygons];
memcpy(polygons, other.polygons, sizeof(PolygonT) * num_polygons);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment