Skip to content

Commit 5a3f34a

Browse files
committed
Fix children[] array not deleted in deleteNodeRecurs function.
1 parent 812fb98 commit 5a3f34a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

octomap/include/octomap/OcTreeBaseImpl.hxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,10 @@ namespace octomap {
706706
this->deleteNodeChild(node, pos);
707707

708708
if (!nodeHasChildren(node))
709+
if(node->children != NULL){
710+
delete[] node->children;
711+
node->children = NULL;
712+
}
709713
return true;
710714
else{
711715
node->updateOccupancyChildren(); // TODO: occupancy?

0 commit comments

Comments
 (0)