Fix #23583: crash when deleting last keyframe in an f-curve with a generator
f-modifier.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user