From e43d482cc93c64d55b1f58178db68551077e6560 Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Fri, 4 Sep 2020 15:01:04 -0300 Subject: Fix T80426: Crash when deleting custom orientation Indices referencing other orientations were not being updated, --- source/blender/blenkernel/intern/scene.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 3098aa79b88..00218b1be51 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -2424,6 +2424,10 @@ void BKE_scene_transform_orientation_remove(Scene *scene, TransformOrientation * orient_slot->type = V3D_ORIENT_GLOBAL; orient_slot->index_custom = -1; } + else if (orient_slot->index_custom > orientation_index) { + BLI_assert(orient_slot->type == V3D_ORIENT_CUSTOM); + orient_slot->index_custom--; + } } BLI_freelinkN(&scene->transform_spaces, orientation); -- cgit v1.2.3