diff options
Diffstat (limited to 'source/blender/blenkernel/intern/colortools.c')
-rw-r--r-- | source/blender/blenkernel/intern/colortools.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c index 7c03c75bd99..d65c81b4f9b 100644 --- a/source/blender/blenkernel/intern/colortools.c +++ b/source/blender/blenkernel/intern/colortools.c @@ -105,9 +105,18 @@ void curvemapping_free_data(CurveMapping *cumap) int a; for (a = 0; a < CM_TOT; a++) { - if (cumap->cm[a].curve) MEM_freeN(cumap->cm[a].curve); - if (cumap->cm[a].table) MEM_freeN(cumap->cm[a].table); - if (cumap->cm[a].premultable) MEM_freeN(cumap->cm[a].premultable); + if (cumap->cm[a].curve) { + MEM_freeN(cumap->cm[a].curve); + cumap->cm[a].curve = NULL; + } + if (cumap->cm[a].table) { + MEM_freeN(cumap->cm[a].table); + cumap->cm[a].table = NULL; + } + if (cumap->cm[a].premultable) { + MEM_freeN(cumap->cm[a].premultable); + cumap->cm[a].premultable = NULL; + } } } |