diff --git a/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Reconstruction_triangulation_2.h b/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Reconstruction_triangulation_2.h index 01ca292a6fe..fd37e694cc3 100644 --- a/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Reconstruction_triangulation_2.h +++ b/Optimal_transportation_reconstruction_2/include/CGAL/OTR_2/Reconstruction_triangulation_2.h @@ -795,10 +795,11 @@ public: boost::optional Dqt; typename CGAL::cpp11::result_of::type result = intersection(lab, lts); - if (result!=boost::none) + if (result) { const Point* iq = boost::get(&(*result)); - Dqt = CGAL::approximate_sqrt(geom_traits().compute_squared_distance_2_object()(*iq, pt)); + if (iq) + Dqt = CGAL::approximate_sqrt(geom_traits().compute_squared_distance_2_object()(*iq, pt)); } return std::make_pair( (Dabt < FT(0) ? false : true) ,Dqt );