Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormano-wii <germano.costa@ig.com.br>2020-01-04 06:34:47 +0300
committermano-wii <germano.costa@ig.com.br>2020-01-04 06:34:47 +0300
commitaad09525fb554ed023419d1c4fd12a5b8da72660 (patch)
tree2c6b1449194695ca6d811667a4a925118a9c15c8 /source/blender/blenlib
parent025d13045abec142528f44576bfdcce9ef0da90a (diff)
BLI_bvhtree_overlap: Fix wrong count of child nodes
As you can see, here is testing the "children" of `node1`. So bvhtree is `tree1`. This problem has never been observed because usually `tree_type` of `tree1` equals `tree_type` of `tree2`.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/intern/BLI_kdopbvh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c
index 2674e6c61dc..7ac4a362cf4 100644
--- a/source/blender/blenlib/intern/BLI_kdopbvh.c
+++ b/source/blender/blenlib/intern/BLI_kdopbvh.c
@@ -1129,7 +1129,7 @@ static void tree_overlap_traverse(BVHOverlapData_Thread *data_thread,
}
}
else {
- for (j = 0; j < data->tree2->tree_type; j++) {
+ for (j = 0; j < data->tree1->tree_type; j++) {
if (node1->children[j]) {
tree_overlap_traverse(data_thread, node1->children[j], node2);
}
@@ -1176,7 +1176,7 @@ static void tree_overlap_traverse_cb(BVHOverlapData_Thread *data_thread,
}
}
else {
- for (j = 0; j < data->tree2->tree_type; j++) {
+ for (j = 0; j < data->tree1->tree_type; j++) {
if (node1->children[j]) {
tree_overlap_traverse_cb(data_thread, node1->children[j], node2);
}