diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2020-09-04 21:01:04 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-10-07 10:59:17 +0300 |
commit | d745d0a7dc3ec20e2a9b3a3a214088104d25667c (patch) | |
tree | 1b779fce63c070a2fbc3b2f203c7e6d8635b935b /source | |
parent | bfa485a26ffe5897e23f7618071e21bc953fc445 (diff) |
Fix T80426: Crash when deleting custom orientation
Indices referencing other orientations were not being updated,
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); |