diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2020-09-04 21:01:04 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-09-21 09:38:54 +0300 |
commit | 293acae9220fecd24ed90fd01aa1544130bf3c6a (patch) | |
tree | c5d1a38f647ad67d2dd172acabefd72b5ed45118 /source/blender | |
parent | 211b39087117664a196825ec62e94adb8ff6e623 (diff) |
Fix T80426: Crash when deleting custom orientation
Indices referencing other orientations were not being updated,
Diffstat (limited to 'source/blender')
-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 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); |