diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2020-09-04 21:01:04 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2020-09-04 21:01:04 +0300 |
commit | e43d482cc93c64d55b1f58178db68551077e6560 (patch) | |
tree | 6cb5bbddd1c5619a9a7b36fb1a33dc5502c42daf /source/blender | |
parent | 1767a7c9866fc85b25061c0c3302b1692c49bfb0 (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 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); |