Fix crash in recent pose-bone transform cleanup
ff5e8e6d53
dereferenced a NULL pointer
when dragging a bone with a connected parent in pose-mode.
This commit is contained in:
parent
709f67cbf0
commit
cabc9506f9
Notes:
blender-bot
2023-02-13 23:17:13 +01:00
Referenced by issue #95463, Crrash when trying to rotate a bone in pose mode
|
@ -751,27 +751,29 @@ 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;
|
||||
}
|
||||
}
|
||||
if ((pchan->protectflag & OB_LOCK_ROT) != OB_LOCK_ROT) {
|
||||
has_translate_rotate[1] = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ((pchan->protectflag & OB_LOCK_LOC) != OB_LOCK_LOC) {
|
||||
has_translate_rotate[0] = true;
|
||||
}
|
||||
has_translate_rotate[0] = true;
|
||||
}
|
||||
if ((pchan->protectflag & OB_LOCK_ROT) != OB_LOCK_ROT) {
|
||||
has_translate_rotate[1] = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
has_translate_rotate[0] = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue