diff --git a/TDS_3/include/CGAL/Triangulation_data_structure_3.h b/TDS_3/include/CGAL/Triangulation_data_structure_3.h index b9fbf0bf30e..c52f7a73275 100644 --- a/TDS_3/include/CGAL/Triangulation_data_structure_3.h +++ b/TDS_3/include/CGAL/Triangulation_data_structure_3.h @@ -3573,6 +3573,12 @@ is_valid(bool verbose, int level ) const size_type cell_count; if ( ! count_cells(cell_count,verbose,level) ) return false; + if( number_of_cells() != cell_count ) { + if (verbose) + std::cerr << "wrong number of cells" << std::endl; + CGAL_assertion(false); + return false; + } size_type edge_count; if ( ! count_edges(edge_count,verbose,level) ) return false;