diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-06 06:29:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-06 06:52:38 +0300 |
commit | f79930989d4f0bd04a1d524571cd25ac214020fb (patch) | |
tree | 3e254bf02bd3604e3cf77f73b65e11ad4eb1ce38 | |
parent | b2889c7cf122a5bc6b028470c3c3800637e780ab (diff) |
Revert "Fix T62210: endless loop in kd tree lookup"
This reverts commit 301bcf771dec827138412ca6e7a25e2269eb5e9e.
Caused crash entering particle edit mode.
-rw-r--r-- | source/blender/blenlib/intern/BLI_kdtree.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/blenlib/intern/BLI_kdtree.c b/source/blender/blenlib/intern/BLI_kdtree.c index 20e30ce669c..4f12bd0a93f 100644 --- a/source/blender/blenlib/intern/BLI_kdtree.c +++ b/source/blender/blenlib/intern/BLI_kdtree.c @@ -112,15 +112,10 @@ static uint kdtree_balance(KDTreeNode *nodes, uint totnode, uint axis, const uin float co; uint left, right, median, i, j; - if (totnode <= 0) { + if (totnode <= 0) return KD_NODE_UNSET; - } - else if (totnode == 1) { - node = nodes + ofs; - node->left = KD_NODE_UNSET; - node->right = KD_NODE_UNSET; + else if (totnode == 1) return 0 + ofs; - } /* quicksort style sorting around median */ left = 0; |