mirror of https://github.com/CGAL/cgal
`&*handle`, if handle is null, is undefined-behavior
This patch fixes an undefined behavior: when one want to convert a handle to a point, we used `&*handle` a lot. But dereferencing the default-constructed (null) handle, is undefined-behavior. The patch calls `operator->` of the handle class, instead.
This commit is contained in:
parent
f8a37e59ef
commit
f9c9cfa40b
|
|
@ -164,7 +164,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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue