Skip to content

Commit

Permalink
core: fix deletion order
Browse files Browse the repository at this point in the history
  • Loading branch information
jcarpent committed Jan 25, 2022
1 parent 72a522a commit a3f9b43
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions include/hpp/fcl/shape/details/convex.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,10 @@ template <typename PolygonT>
void Convex<PolygonT>::set(bool own_storage, Vec3f* points_, unsigned int num_points_,
PolygonT* polygons_, unsigned int num_polygons_)
{
ConvexBase::set(own_storage,points_,num_points_);

if (own_storage_)
{
delete [] polygons;
}
ConvexBase::set(own_storage,points_,num_points_);

num_polygons = num_polygons_;
polygons = polygons_;

Expand Down

0 comments on commit a3f9b43

Please sign in to comment.