diff options
author | Bastien Montagne <bastien@blender.org> | 2021-08-05 18:17:15 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-08-05 18:21:25 +0300 |
commit | 6c326ba0a24f24763b751483a0ee0cc98abdd921 (patch) | |
tree | 340e7546c76bf293ac898d19c261b295138f57dd /source/blender/blenkernel | |
parent | 834523e2391b3c8dab393daa040e135d7b729f86 (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/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_blender_version.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/constraint.c | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/blenkernel/BKE_blender_version.h b/source/blender/blenkernel/BKE_blender_version.h index 0d5835a5eed..5ef56fab9cb 100644 --- a/source/blender/blenkernel/BKE_blender_version.h +++ b/source/blender/blenkernel/BKE_blender_version.h @@ -39,7 +39,7 @@ extern "C" { /* Blender file format version. */ #define BLENDER_FILE_VERSION BLENDER_VERSION -#define BLENDER_FILE_SUBVERSION 16 +#define BLENDER_FILE_SUBVERSION 17 /* Minimum Blender version that supports reading file written with the current * version. Older Blender versions will test this and show a warning if the file diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 022073b0f12..b7e02f06571 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -4616,9 +4616,7 @@ static void splineik_free(bConstraint *con) bSplineIKConstraint *data = con->data; /* binding array */ - if (data->points) { - MEM_freeN(data->points); - } + MEM_SAFE_FREE(data->points); } static void splineik_copy(bConstraint *con, bConstraint *srccon) |