Test if the tree is empty before building the kd-tree (to fix all the execution failures in the tests)

This commit is contained in:
Maxime Gimeno 2019-11-18 10:27:04 +01:00
parent dd566a2c96
commit 7b05052a27
1 changed files with 1 additions and 1 deletions

View File

@ -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;