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:
authorCampbell Barton <ideasman42@gmail.com>2010-12-15 19:57:56 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-12-15 19:57:56 +0300
commit2c55dd96adee33962b2a618e7678ed61c07d1446 (patch)
treef7f07cedfec183d187d496062c8b3e25bb619d3e /source/blender/editors/animation/keyframes_general.c
parent0a3902bb5515c4e7ce02fc1a86cc6f2b3868c082 (diff)
missing check for keyframe paste, was crashing when no keyframes to paste into.
Diffstat (limited to 'source/blender/editors/animation/keyframes_general.c')
-rw-r--r--source/blender/editors/animation/keyframes_general.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c
index 437f74201e4..07c8ddcdb4a 100644
--- a/source/blender/editors/animation/keyframes_general.c
+++ b/source/blender/editors/animation/keyframes_general.c
@@ -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: