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:
authorCampbell Barton <ideasman42@gmail.com>2012-08-28 14:02:10 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-28 14:02:10 +0400
commitc43583a23ae0e552779148236f973d20275f9bd0 (patch)
tree5a881f7c41f6838ac0841495e699b61a2dcbc44c /source/blender/blenkernel/intern/colortools.c
parenta798371df157ecd30e4bfd6035c7a4c6a8b1f277 (diff)
fix for own crash caused by curve refactor, now curve tables are initialized once when the tree is initialized.
thanks to Antony Riakiotakis for providing a fix, though this works a little different.
Diffstat (limited to 'source/blender/blenkernel/intern/colortools.c')
-rw-r--r--source/blender/blenkernel/intern/colortools.c15
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;
+ }
}
}