Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/animation/keyframes_general.c')
-rw-r--r--source/blender/editors/animation/keyframes_general.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c
index 08b02020f76..6ed9803dbd3 100644
--- a/source/blender/editors/animation/keyframes_general.c
+++ b/source/blender/editors/animation/keyframes_general.c
@@ -767,16 +767,15 @@ short copy_animedit_keys(bAnimContext *ac, ListBase *anim_data)
* Storing the relevant information here helps avoiding crashes if we undo-repaste. */
if ((aci->id_type == ID_OB) && (((Object *)aci->id)->type == OB_ARMATURE) && aci->rna_path) {
Object *ob = (Object *)aci->id;
- bPoseChannel *pchan;
- char *bone_name;
- bone_name = BLI_str_quoted_substrN(aci->rna_path, "pose.bones[");
- pchan = BKE_pose_channel_find_name(ob->pose, bone_name);
- if (pchan) {
- aci->is_bone = true;
- }
+ char *bone_name = BLI_str_quoted_substrN(aci->rna_path, "pose.bones[");
if (bone_name) {
+ bPoseChannel *pchan = BKE_pose_channel_find_name(ob->pose, bone_name);
MEM_freeN(bone_name);
+
+ if (pchan) {
+ aci->is_bone = true;
+ }
}
}