From 1fa107c8c4d85cb68d508e5dee791b6ca48dd476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 7 Oct 2015 17:01:55 +0200 Subject: [PATCH] deallocate is only called if the number of curves is not 0 --- .../include/CGAL/Boolean_set_operations_2/Gps_agg_op_sweep.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_op_sweep.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_op_sweep.h index 38305e518bf..b0bf6032e96 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_op_sweep.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_agg_op_sweep.h @@ -115,8 +115,9 @@ public: this->m_visitor->before_sweep(); // Allocate all of the Subcurve objects as one block. this->m_num_of_subCurves = static_cast(std::distance (curves_begin, curves_end)); - this->m_subCurves = - this->m_subCurveAlloc.allocate (this->m_num_of_subCurves); + if (this->m_num_of_subCurves > 0) + this->m_subCurves = + this->m_subCurveAlloc.allocate (this->m_num_of_subCurves); this->m_curves_pair_set.resize (2 * this->m_num_of_subCurves);