diff options
Diffstat (limited to 'source/blender/editors/transform/transform_snap_object.c')
-rw-r--r-- | source/blender/editors/transform/transform_snap_object.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c index d01513f2064..2d7629604b1 100644 --- a/source/blender/editors/transform/transform_snap_object.c +++ b/source/blender/editors/transform/transform_snap_object.c @@ -786,9 +786,8 @@ static bool snapDerivedMesh( /* the tree is owned by the DM and may have been freed since we last used! */ if (treedata && treedata->tree) { - if (BLI_linklist_index(dm->bvhCache, treedata->tree) == -1) { + if (treedata->cached && !bvhcache_has_tree(&dm->bvhCache, treedata->tree)) { free_bvhtree_from_mesh(treedata); - } } } |