Fix #23583: crash when deleting last keyframe in an f-curve with a generator

f-modifier.
This commit is contained in:
2010-09-25 20:19:56 +00:00
parent 38df1439c8
commit 4127dba12c

View File

@@ -82,6 +82,12 @@ void delete_fcurve_key(FCurve *fcu, int index, short do_recalc)
/* Delete this keyframe */
memmove(&fcu->bezt[index], &fcu->bezt[index+1], sizeof(BezTriple)*(fcu->totvert-index-1));
fcu->totvert--;
if (fcu->totvert == 0) {
if (fcu->bezt)
MEM_freeN(fcu->bezt);
fcu->bezt= NULL;
}
/* recalc handles - only if it won't cause problems */
if (do_recalc)