From 7b05052a27e78f20856199e5f61db653e18de1e3 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Mon, 18 Nov 2019 10:27:04 +0100 Subject: [PATCH] Test if the tree is empty before building the kd-tree (to fix all the execution failures in the tests) --- AABB_tree/include/CGAL/AABB_tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AABB_tree/include/CGAL/AABB_tree.h b/AABB_tree/include/CGAL/AABB_tree.h index 8e977c76f57..0c60f3c0a0e 100644 --- a/AABB_tree/include/CGAL/AABB_tree.h +++ b/AABB_tree/include/CGAL/AABB_tree.h @@ -705,7 +705,7 @@ public: // In case the users has switched on the accelerated distance query // data structure with the default arguments, then it has to be // /built/rebuilt. - if(m_default_search_tree_constructed){ + if(m_default_search_tree_constructed && !empty()){ build_kd_tree(); } m_need_build = false;