fix for crash when inserting keyframes in a mesh

This commit is contained in:
Campbell Barton
2009-12-16 17:49:51 +00:00
parent 852a8b40f8
commit d71c094bc4

View File

@@ -851,6 +851,11 @@ short insert_keyframe (ID *id, bAction *act, const char group[], const char rna_
/* get action to add F-Curve+keyframe to */
act= verify_adt_action(id, 1);
if(act==NULL) {
printf("Insert Key: Could not insert keyframe, as this type does not support animation data (ID = %s, Path = %s)\n", id->name, rna_path);
return 0;
}
/* apply NLA-mapping to frame to use (if applicable) */
cfra= BKE_nla_tweakedit_remap(adt, cfra, NLATIME_CONVERT_UNMAP);
}