diff options
author | Joshua Leung <aligorith@gmail.com> | 2017-10-16 14:44:20 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2017-10-16 14:45:14 +0300 |
commit | 67e0a44e619685aece11f4ebedb7862ed024760f (patch) | |
tree | 62ebb08b1587cb24e0346ec49ee0510cce9c0435 /source | |
parent | 870b4b673511094cf0beaeaf07305407ccdda47a (diff) |
Replace freeing checks with MEM_SAFE_FREE
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/fcurve.c | 7 |
1 files changed, 3 insertions, 4 deletions
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); |