From 315582f28cefbf158b308f0dea17dab949eb6eff Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 30 Apr 2021 00:51:14 +1000 Subject: Fix T86799: Boolean crashes duplicating object with "Fast" solver BMesh intersect could leave invalid items in the selection list, causing a crash. The list is now cleared since boolean is such a destructive operation, it's unlikely the selection order would be useful. Thanks to @lukastoenne for finding the root cause. --- source/blender/bmesh/tools/bmesh_intersect.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source') diff --git a/source/blender/bmesh/tools/bmesh_intersect.c b/source/blender/bmesh/tools/bmesh_intersect.c index c176210426b..710d7f79637 100644 --- a/source/blender/bmesh/tools/bmesh_intersect.c +++ b/source/blender/bmesh/tools/bmesh_intersect.c @@ -1660,5 +1660,9 @@ bool BM_mesh_intersect(BMesh *bm, BLI_memarena_free(s.mem_arena); + /* It's unlikely the selection history is useful at this point, + * if this is not called this array would need to be validated, see: T86799. */ + BM_select_history_clear(bm); + return (has_edit_isect || has_edit_boolean); } -- cgit v1.2.3