[Bf-blender-cvs] [d745d0a7dc3] blender-v2.83-release: Fix T80426: Crash when deleting custom orientation

Germano Cavalcante noreply at git.blender.org
Wed Oct 7 10:23:18 CEST 2020


Commit: d745d0a7dc3ec20e2a9b3a3a214088104d25667c
Author: Germano Cavalcante
Date:   Fri Sep 4 15:01:04 2020 -0300
Branches: blender-v2.83-release
https://developer.blender.org/rBd745d0a7dc3ec20e2a9b3a3a214088104d25667c

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 410d5b41057..2e6582de8b4 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -2230,6 +2230,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