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:
authorBastien Montagne <bastien@blender.org>2021-08-05 18:17:15 +0300
committerBastien Montagne <bastien@blender.org>2021-08-05 18:21:25 +0300
commit6c326ba0a24f24763b751483a0ee0cc98abdd921 (patch)
tree340e7546c76bf293ac898d19c261b295138f57dd /source/blender/editors
parent834523e2391b3c8dab393daa040e135d7b729f86 (diff)
Fix T83164: Spline IK `joint_bindings` parameter is broken.
Code freeing the array would not properly reset its length value to zero. Note that this corrupted data could also be saved in .blend files, so had to bump fileversion and add some doversion code too. Fix T90166: crash when creating a liboverride.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/object/object_constraint.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index 4970338973d..3d0213f1830 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -432,11 +432,8 @@ static void test_constraint(
* free the points array and request a rebind...
*/
if ((data->points == NULL) || (data->numpoints != data->chainlen + 1)) {
- /* free the points array */
- if (data->points) {
- MEM_freeN(data->points);
- data->points = NULL;
- }
+ MEM_SAFE_FREE(data->points);
+ data->numpoints = 0;
/* clear the bound flag, forcing a rebind next time this is evaluated */
data->flag &= ~CONSTRAINT_SPLINEIK_BOUND;