[Bf-blender-cvs] [293acae9220] blender-v2.90-release: Fix T80426: Crash when deleting custom orientation

Germano Cavalcante noreply at git.blender.org
Mon Sep 21 09:50:31 CEST 2020


Commit: 293acae9220fecd24ed90fd01aa1544130bf3c6a
Author: Germano Cavalcante
Date:   Fri Sep 4 15:01:04 2020 -0300
Branches: blender-v2.90-release
https://developer.blender.org/rB293acae9220fecd24ed90fd01aa1544130bf3c6a

Fix T80426: Crash when deleting custom orientation

Indices referencing other orientations were not being updated,

===================================================================

M	source/blender/blenkernel/intern/scene.c

===================================================================

diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 141737b46ee..2ce671f6dec 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -2402,6 +2402,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);



More information about the Bf-blender-cvs mailing list