diff options
Diffstat (limited to 'source/blender/blenlib/intern/pbvh.c')
-rw-r--r-- | source/blender/blenlib/intern/pbvh.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/pbvh.c b/source/blender/blenlib/intern/pbvh.c index 6f33fab2571..c1bdbf32fac 100644 --- a/source/blender/blenlib/intern/pbvh.c +++ b/source/blender/blenlib/intern/pbvh.c @@ -694,6 +694,11 @@ void BLI_pbvh_search_gather(PBVH *bvh, pbvh_iter_end(&iter); + if(tot == 0 && array) { + MEM_freeN(array); + array= NULL; + } + *r_array= array; *r_tot= tot; } |