mirror of https://github.com/CGAL/cgal
BUGFIX Fixed the leak of an empty memory block.
This commit is contained in:
parent
0c5b3fcf85
commit
3889dc2d7f
|
|
@ -219,8 +219,11 @@ void Basic_sweep_line_2<Tr, Vis, Subcv, Evnt, Alloc>::_init_structures()
|
||||||
CGAL_assertion(m_queue->empty());
|
CGAL_assertion(m_queue->empty());
|
||||||
CGAL_assertion((m_statusLine.size() == 0));
|
CGAL_assertion((m_statusLine.size() == 0));
|
||||||
|
|
||||||
// Allocate all of the Subcurve objects as one block.
|
// Allocate all of the Subcurve objects as one block. Don't allocate
|
||||||
m_subCurves = m_subCurveAlloc.allocate(m_num_of_subCurves);
|
// anything when there are no subcurves.
|
||||||
|
if (m_num_of_subCurves > 0) {
|
||||||
|
m_subCurves = m_subCurveAlloc.allocate(m_num_of_subCurves);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue