diff --git a/Util/kdtree.h b/Util/kdtree.h index fb9f140..434b767 100644 --- a/Util/kdtree.h +++ b/Util/kdtree.h @@ -127,6 +127,8 @@ class KDTree { nearest = current_distance; nearest_triangle = triangle; result = current_result; + } else { + delete[] current_result.c; } } }