missing check for keyframe paste, was crashing when no keyframes to paste into.

This commit is contained in:
Campbell Barton 2010-12-15 16:57:56 +00:00
parent 0a3902bb55
commit 2c55dd96ad

@ -753,11 +753,16 @@ short paste_animedit_keys (bAnimContext *ac, ListBase *anim_data,
int pass;
/* check if buffer is empty */
if (ELEM(NULL, animcopybuf.first, animcopybuf.last)) {
if (animcopybuf.first == NULL) {
BKE_report(ac->reports, RPT_WARNING, "No data in buffer to paste");
return -1;
}
if (anim_data->first == NULL) {
BKE_report(ac->reports, RPT_WARNING, "No FCurves to paste into");
return -1;
}
/* mathods of offset */
switch(offset_mode) {
case KEYFRAME_PASTE_OFFSET_CFRA_START: