Fix: assert failure when snapping to geometry with only vertices

These geometries do not have "EDGE_ENDPOINT".
This commit is contained in:
Germano Cavalcante
2024-11-18 11:17:57 -03:00
parent 1a6c586e81
commit 607b2dd826

View File

@@ -557,8 +557,7 @@ static eSnapMode snapMesh(SnapObjectContext *sctx,
elem = SCE_SNAP_TO_EDGE;
}
}
else {
BLI_assert(snap_to & SCE_SNAP_TO_EDGE_ENDPOINT);
else if (snap_to & SCE_SNAP_TO_EDGE_ENDPOINT) {
if (bvhtree[0]) {
/* Snap to loose edges verts. */
BLI_bvhtree_find_nearest_projected(