[Bf-blender-cvs] [cabc9506f9a] master: Fix crash in recent pose-bone transform cleanup
Campbell Barton
noreply at git.blender.org
Wed Feb 2 08:04:18 CET 2022
Commit: cabc9506f9ace9f89f4a6d92dff676284e3a989f
Author: Campbell Barton
Date: Wed Feb 2 18:02:13 2022 +1100
Branches: master
https://developer.blender.org/rBcabc9506f9ace9f89f4a6d92dff676284e3a989f
Fix crash in recent pose-bone transform cleanup
ff5e8e6d535374891e09bc0e6ceb7059a22bdd53 dereferenced a NULL pointer
when dragging a bone with a connected parent in pose-mode.
===================================================================
M source/blender/editors/transform/transform_convert_armature.c
===================================================================
diff --git a/source/blender/editors/transform/transform_convert_armature.c b/source/blender/editors/transform/transform_convert_armature.c
index 2a696dd0593..04a8d462924 100644
--- a/source/blender/editors/transform/transform_convert_armature.c
+++ b/source/blender/editors/transform/transform_convert_armature.c
@@ -751,28 +751,30 @@ void createTransPose(TransInfo *t)
tc->data_len++;
- if (has_translate_rotate[0] && has_translate_rotate[1]) {
- continue;
- }
+ if (has_translate_rotate != NULL) {
+ if (has_translate_rotate[0] && has_translate_rotate[1]) {
+ continue;
+ }
- if (has_targetless_ik(pchan) == NULL) {
- if (pchan->parent && (bone->flag & BONE_CONNECTED)) {
- if (bone->flag & BONE_HINGE_CHILD_TRANSFORM) {
- has_translate_rotate[0] = true;
+ if (has_targetless_ik(pchan) == NULL) {
+ if (pchan->parent && (bone->flag & BONE_CONNECTED)) {
+ if (bone->flag & BONE_HINGE_CHILD_TRANSFORM) {
+ has_translate_rotate[0] = true;
+ }
}
- }
- else {
- if ((pchan->protectflag & OB_LOCK_LOC) != OB_LOCK_LOC) {
- has_translate_rotate[0] = true;
+ else {
+ if ((pchan->protectflag & OB_LOCK_LOC) != OB_LOCK_LOC) {
+ has_translate_rotate[0] = true;
+ }
+ }
+ if ((pchan->protectflag & OB_LOCK_ROT) != OB_LOCK_ROT) {
+ has_translate_rotate[1] = true;
}
}
- if ((pchan->protectflag & OB_LOCK_ROT) != OB_LOCK_ROT) {
- has_translate_rotate[1] = true;
+ else {
+ has_translate_rotate[0] = true;
}
}
- else {
- has_translate_rotate[0] = true;
- }
}
if (tc->data_len == 0) {
More information about the Bf-blender-cvs
mailing list