Avoid memory corruption when GodotConvexPolygonShape3D is setup more than once

This commit is contained in:
Mariano Javier Suligoy 2022-11-02 16:16:18 -03:00
parent eddaab17ea
commit a39ac1383b

View File

@ -1085,6 +1085,8 @@ void GodotConvexPolygonShape3D::_setup(const Vector<Vector3> &p_vertices) {
if (err != OK) {
ERR_PRINT("Failed to build convex hull");
}
extreme_vertices.resize(0);
vertex_neighbors.resize(0);
AABB _aabb;