diff options
author | Joshua Leung <aligorith@gmail.com> | 2008-01-31 04:49:15 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2008-01-31 04:49:15 +0300 |
commit | 5f5d9ede88be91442657707184315f095c8ea2f9 (patch) | |
tree | b4657be1fb3faaa5aab3c92fd3ec88446dd28635 /source/blender/src/editipo.c | |
parent | cac8215cadb03546ca826e76ed933bf89711bcdf (diff) |
Bugfix #8070: blender crash when assigning driver to bone constraint
When there were no keyframes for a constraint on a bone, trying to add a driver to the influence curve would fail, as a new curve would be added the some mysterious place. The cause was a missing case, as the code assumed that no user would try to add from IPO-Editor in such a way.
Diffstat (limited to 'source/blender/src/editipo.c')
-rw-r--r-- | source/blender/src/editipo.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/source/blender/src/editipo.c b/source/blender/src/editipo.c index fce7fab779d..af762c037d9 100644 --- a/source/blender/src/editipo.c +++ b/source/blender/src/editipo.c @@ -1050,17 +1050,26 @@ static void get_ipo_context(short blocktype, ID **from, Ipo **ipo, char *actname } /* set actname if in posemode */ - if(ob->action) { - if(ob->flag & OB_POSEMODE) { + if (ob->action) { + if (ob->flag & OB_POSEMODE) { bPoseChannel *pchan= get_active_posechannel(ob); - if(pchan) { + if (pchan) { BLI_strncpy(actname, pchan->name, 32); BLI_strncpy(bonename, pchan->name, 32); } } - else if(ob->ipoflag & OB_ACTION_OB) + else if (ob->ipoflag & OB_ACTION_OB) strcpy(actname, "Object"); } + else { + if (ob->flag & OB_POSEMODE) { + bPoseChannel *pchan= get_active_posechannel(ob); + if (pchan) { + BLI_strncpy(actname, pchan->name, 32); + BLI_strncpy(bonename, pchan->name, 32); + } + } + } } } } |