Fixed a problem where duplicating bones with a freshly created

armature would segfault (access to a non-existent pose).
This commit is contained in:
Chris Want 2004-01-04 17:11:22 +00:00
parent 03fe244b58
commit 2572db0bf0

@ -1998,7 +1998,7 @@ void update_dup_subtarget(EditBone *dupBone)
char *subname;
if ( (chan = get_pose_channel(OBACT->pose, dupBone->name)) )
if ( (chan = verify_pose_channel(OBACT->pose, dupBone->name)) )
if ( (conlist = &chan->constraints) )
for (curcon = conlist->first; curcon; curcon=curcon->next) {
/* does this constraint have a subtarget in
@ -2057,7 +2057,7 @@ void adduplicate_armature(void)
bPoseChannel *chanold, *channew;
ListBase *listold, *listnew;
chanold = get_pose_channel (OBACT->pose, curBone->name);
chanold = verify_pose_channel (OBACT->pose, curBone->name);
if (chanold) {
listold = &chanold->constraints;
if (listold){