[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33691] trunk/blender/source/blender/ editors/animation/keyframes_general.c: missing check for keyframe paste, was crashing when no keyframes to paste into.

Campbell Barton ideasman42 at gmail.com
Wed Dec 15 17:57:57 CET 2010


Revision: 33691
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33691
Author:   campbellbarton
Date:     2010-12-15 17:57:56 +0100 (Wed, 15 Dec 2010)

Log Message:
-----------
missing check for keyframe paste, was crashing when no keyframes to paste into.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/animation/keyframes_general.c

Modified: trunk/blender/source/blender/editors/animation/keyframes_general.c
===================================================================
--- trunk/blender/source/blender/editors/animation/keyframes_general.c	2010-12-15 16:46:59 UTC (rev 33690)
+++ trunk/blender/source/blender/editors/animation/keyframes_general.c	2010-12-15 16:57:56 UTC (rev 33691)
@@ -753,11 +753,16 @@
 	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:





More information about the Bf-blender-cvs mailing list