-== kdop ==-
authorDaniel Genrich <daniel.genrich@gmx.net>
Sun, 25 May 2008 14:34:03 +0000 (14:34 +0000)
committerDaniel Genrich <daniel.genrich@gmx.net>
Sun, 25 May 2008 14:34:03 +0000 (14:34 +0000)
1. fix crash on collision

source/blender/blenlib/intern/BLI_kdopbvh.c

index 5c3849d12104418991161ed2e642581b596740e9..cf326f3f46005ea2e76e6b795c25e2d887e72232 100644 (file)
@@ -719,7 +719,7 @@ BVHTreeOverlap *BLI_bvhtree_overlap(BVHTree *tree1, BVHTree *tree2, int *result)
        if(!tree_overlap(tree1->nodes[tree1->totleaf]->bv, tree2->nodes[tree2->totleaf]->bv, 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++)
        {
@@ -755,7 +755,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;