Fix T99742: crash when generating rigify rigs, after recent changes
Differential Revision: https://developer.blender.org/D15473
This commit is contained in:
parent
c7f788b877
commit
47f3b53756
Notes:
blender-bot
2023-02-14 00:57:33 +01:00
Referenced by issue #99819, Edit Bone Name = Crash Referenced by issue #99742, Crash blender when generate rig with Rigify.
|
@ -285,7 +285,7 @@ void ED_armature_bone_rename(Main *bmain,
|
|||
/* fix camera focus */
|
||||
if (ob->type == OB_CAMERA) {
|
||||
Camera *cam = (Camera *)ob->data;
|
||||
if (cam->dof.focus_object->data == arm){
|
||||
if ((cam->dof.focus_object != NULL) && (cam->dof.focus_object->data == arm)) {
|
||||
if (STREQ(cam->dof.focus_subtarget, oldname)) {
|
||||
BLI_strncpy(cam->dof.focus_subtarget, newname, MAXBONENAME);
|
||||
DEG_id_tag_update(&cam->id, ID_RECALC_COPY_ON_WRITE);
|
||||
|
|
Loading…
Reference in New Issue