Merge BVH tree fixes from cloth branch
authorAndre Susano Pinto <andresusanopinto@gmail.com>
Sun, 25 May 2008 15:47:54 +0000 (15:47 +0000)
committerAndre Susano Pinto <andresusanopinto@gmail.com>
Sun, 25 May 2008 15:47:54 +0000 (15:47 +0000)
svn merge -r 14954:14963 https://svn.blender.org/svnroot/bf-blender/branches/cloth/blender/source/blender/blenlib/BLI_kdopbvh.h
svn merge -r 14954:14963 https://svn.blender.org/svnroot/bf-blender/branches/cloth/blender/source/blender/blenlib/intern/BLI_kdopbvh.c

source/blender/blenlib/intern/BLI_kdopbvh.c

index c510f9afb00d005a72a13b424d4026f57a359f7b..97a0e305e898c3124b581eb4a653aab0437778be 100644 (file)
@@ -741,7 +741,7 @@ BVHTreeOverlap *BLI_bvhtree_overlap(BVHTree *tree1, BVHTree *tree2, int *result)
        if(!tree_overlap(tree1->nodes[tree1->totleaf], tree2->nodes[tree2->totleaf], MIN2(tree1->start_axis, tree2->start_axis), MIN2(tree1->stop_axis, tree2->stop_axis)))
                return 0;
 
-       *data = MEM_callocN(sizeof(BVHOverlapData *)* tree1->tree_type, "BVHOverlapData_star");
+       data = MEM_callocN(sizeof(BVHOverlapData *)* tree1->tree_type, "BVHOverlapData_star");
        
        for(j = 0; j < tree1->tree_type; j++)
        {
@@ -777,7 +777,7 @@ BVHTreeOverlap *BLI_bvhtree_overlap(BVHTree *tree1, BVHTree *tree2, int *result)
                free(data[j]->overlap);
                MEM_freeN(data[j]);
        }
-       MEM_freeN(*data);
+       MEM_freeN(data);
        
        (*result) = total;
        return overlap;