Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormano-wii <germano.costa@ig.com.br>2019-08-26 07:18:40 +0300
committermano-wii <germano.costa@ig.com.br>2019-08-26 07:18:40 +0300
commit8d03e04493023d63ec05321ab8dc48dbd22363f2 (patch)
tree6a1b0009e348823107d1965537bdbcd19fbf66bc /source/blender/blenkernel/intern/bvhutils.c
parent22822b0572ae42ec606f617f3d302158694db79d (diff)
Fix assert restricting allowed operation
Diffstat (limited to 'source/blender/blenkernel/intern/bvhutils.c')
-rw-r--r--source/blender/blenkernel/intern/bvhutils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c
index 07fc51953fd..e3df3dd9ba2 100644
--- a/source/blender/blenkernel/intern/bvhutils.c
+++ b/source/blender/blenkernel/intern/bvhutils.c
@@ -1660,12 +1660,13 @@ bool bvhcache_has_tree(const BVHCache *cache, const BVHTree *tree)
* as that will be done when the cache is freed.
*
* A call to this assumes that there was no previous cached tree of the given type
+ * \warning The #BVHTree can be NULL.
*/
void bvhcache_insert(BVHCache **cache_p, BVHTree *tree, int type)
{
BVHCacheItem *item = NULL;
- assert(tree && bvhcache_find(*cache_p, type, &(BVHTree *){0}) == false);
+ assert(bvhcache_find(*cache_p, type, &(BVHTree *){0}) == false);
item = MEM_mallocN(sizeof(BVHCacheItem), "BVHCacheItem");