Revert "Fix T62210: endless loop in kd tree lookup"

This reverts commit 301bcf771d.

Caused crash entering particle edit mode.
This commit is contained in:
Campbell Barton
2019-03-06 14:29:39 +11:00
parent b2889c7cf1
commit f79930989d

View File

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