Skip to content

Commit

Permalink
fix the UBSAN error
Browse files Browse the repository at this point in the history
```
include/CGAL/Poisson_reconstruction_function.h:263:70: runtime error: reference binding to null pointer of type 'struct value_type'
```
  • Loading branch information
lrineau committed Jun 5, 2024
1 parent 7173974 commit 693206c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,10 @@ class Poisson_reconstruction_function

Cell_handle get() const
{
return Triangulation_data_structure::Cell_range::s_iterator_to(*m_cell);
if(m_cell == nullptr)
return {};
else
return Triangulation_data_structure::Cell_range::s_iterator_to(*m_cell);
}
void set (Cell_handle ch) { m_cell = ch.operator->(); }
};
Expand Down

0 comments on commit 693206c

Please sign in to comment.