mirror of https://github.com/CGAL/cgal
Merge pull request #4700 from lrineau/Mesh_3-fix_UBSAN_error_binding_ref_to_null_pointer-GF
Fix UBSAN error: do not bind reference to null pointer
This commit is contained in:
commit
0ccdbf8aff
|
|
@ -408,7 +408,7 @@ public:
|
|||
void set_neighbor(int i, Cell_handle n)
|
||||
{
|
||||
CGAL_triangulation_precondition( i >= 0 && i <= 3);
|
||||
CGAL_triangulation_precondition( this != &*n );
|
||||
CGAL_triangulation_precondition( this != n.operator->() );
|
||||
N[i] = n;
|
||||
}
|
||||
|
||||
|
|
@ -421,10 +421,10 @@ public:
|
|||
void set_neighbors(Cell_handle n0, Cell_handle n1,
|
||||
Cell_handle n2, Cell_handle n3)
|
||||
{
|
||||
CGAL_triangulation_precondition( this != &*n0 );
|
||||
CGAL_triangulation_precondition( this != &*n1 );
|
||||
CGAL_triangulation_precondition( this != &*n2 );
|
||||
CGAL_triangulation_precondition( this != &*n3 );
|
||||
CGAL_triangulation_precondition( this != n0.operator->() );
|
||||
CGAL_triangulation_precondition( this != n1.operator->() );
|
||||
CGAL_triangulation_precondition( this != n2.operator->() );
|
||||
CGAL_triangulation_precondition( this != n3.operator->() );
|
||||
N[0] = n0;
|
||||
N[1] = n1;
|
||||
N[2] = n2;
|
||||
|
|
|
|||
|
|
@ -190,10 +190,10 @@ public:
|
|||
void set_neighbors(Cell_handle n0, Cell_handle n1,
|
||||
Cell_handle n2, Cell_handle n3)
|
||||
{
|
||||
CGAL_triangulation_precondition( this != &*n0 );
|
||||
CGAL_triangulation_precondition( this != &*n1 );
|
||||
CGAL_triangulation_precondition( this != &*n2 );
|
||||
CGAL_triangulation_precondition( this != &*n3 );
|
||||
CGAL_triangulation_precondition( this != n0.operator->() );
|
||||
CGAL_triangulation_precondition( this != n1.operator->() );
|
||||
CGAL_triangulation_precondition( this != n2.operator->() );
|
||||
CGAL_triangulation_precondition( this != n3.operator->() );
|
||||
N[0] = n0;
|
||||
N[1] = n1;
|
||||
N[2] = n2;
|
||||
|
|
|
|||
Loading…
Reference in New Issue