From 67e0a44e619685aece11f4ebedb7862ed024760f Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Tue, 17 Oct 2017 00:44:20 +1300 Subject: Replace freeing checks with MEM_SAFE_FREE --- source/blender/blenkernel/intern/fcurve.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index db6c533ab57..aee465ad0a0 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -86,12 +86,11 @@ void free_fcurve(FCurve *fcu) return; /* free curve data */ - if (fcu->bezt) MEM_freeN(fcu->bezt); - if (fcu->fpt) MEM_freeN(fcu->fpt); + MEM_SAFE_FREE(fcu->bezt); + MEM_SAFE_FREE(fcu->fpt); /* free RNA-path, as this were allocated when getting the path string */ - if (fcu->rna_path) - MEM_freeN(fcu->rna_path); + MEM_SAFE_FREE(fcu->rna_path); /* free extra data - i.e. modifiers, and driver */ fcurve_free_driver(fcu); -- cgit v1.2.3