[Bf-blender-cvs] [e43d482cc93] master: Fix T80426: Crash when deleting custom orientation
Germano Cavalcante
noreply at git.blender.org
Fri Sep 4 20:21:06 CEST 2020
Commit: e43d482cc93c64d55b1f58178db68551077e6560
Author: Germano Cavalcante
Date: Fri Sep 4 15:01:04 2020 -0300
Branches: master
https://developer.blender.org/rBe43d482cc93c64d55b1f58178db68551077e6560
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 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);
More information about the Bf-blender-cvs
mailing list