Permalink
Browse files

Merge pull request #59 from ppiastucki/bvh_rebuild_fix

Fix AABBTree::rebuild() crashing when the tree contains a single geom
  • Loading branch information...
tzaeschke committed Dec 21, 2017
2 parents 06e2a14 + 2c2907c commit 1ae5a728d3f3c271755a2f5bc5d45bd5ff7b3eaf
Showing with 1 addition and 1 deletion.
  1. +1 −1 core/src/main/java/org/ode4j/ode/internal/aabbtree/AABBTree.java
@@ -290,7 +290,7 @@ void rebuild() {
if (numExternalNodes == endNode) {
buildNodes = nodes;
numBuildNodes = endNode;
nodes = new AABBTreeNode[0];
nodes = new AABBTreeNode[FREE_NODES_POOL_SIZE];
} else {
buildNodes = new AABBTreeNode[numExternalNodes];
int endNodeIndex = endNode;

0 comments on commit 1ae5a72

Please sign in to comment.