mirror of https://github.com/CGAL/cgal
Add a CGAL_assertion (prevents std::bad_alloc).
This commit is contained in:
parent
f3d154f62f
commit
c8dc1d84f7
|
|
@ -142,9 +142,9 @@ namespace CGAL {
|
|||
m_search_tree_constructed = false;
|
||||
}
|
||||
|
||||
public:
|
||||
public:
|
||||
// made public for advanced use by the polyhedron demo
|
||||
|
||||
|
||||
/// generic traversal of the tree
|
||||
template <class Query, class Traversal_traits>
|
||||
void traversal(const Query& query, Traversal_traits& traits) const
|
||||
|
|
@ -421,6 +421,7 @@ namespace CGAL {
|
|||
++first;
|
||||
}
|
||||
|
||||
CGAL_assertion(m_primitives.size() > 1);
|
||||
m_p_root_node = new Node[m_primitives.size()-1]();
|
||||
if(m_p_root_node == NULL)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue