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:
Diffstat (limited to 'source/blender/editors/animation/keyframes_general.c')
-rw-r--r--source/blender/editors/animation/keyframes_general.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c
index eb91afa5c84..75ce62d5e27 100644
--- a/source/blender/editors/animation/keyframes_general.c
+++ b/source/blender/editors/animation/keyframes_general.c
@@ -92,10 +92,7 @@ void delete_fcurve_key(FCurve *fcu, int index, bool do_recalc)
fcu->totvert--;
if (fcu->totvert == 0) {
- if (fcu->bezt) {
- MEM_freeN(fcu->bezt);
- }
- fcu->bezt = NULL;
+ MEM_SAFE_FREE(fcu->bezt);
}
/* recalc handles - only if it won't cause problems */
@@ -136,10 +133,7 @@ bool delete_fcurve_keys(FCurve *fcu)
void clear_fcurve_keys(FCurve *fcu)
{
- if (fcu->bezt) {
- MEM_freeN(fcu->bezt);
- }
- fcu->bezt = NULL;
+ MEM_SAFE_FREE(fcu->bezt);
fcu->totvert = 0;
}