diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-02-27 19:46:21 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-02-27 19:46:41 +0300 |
commit | cd5c853307aad8d982833d87ecc84e1303bc04b9 (patch) | |
tree | fcecee621e202e1cf892293f484d06443115b4ca /source/blender/editors | |
parent | 2342cd0a0f6ec37aae6612265939f71e144623a9 (diff) |
Fix memory leak when making duplicates real and parent had constraints
Thanks Bastien for help!
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/object/object_add.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 02b2d8492b4..ae458c722f9 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -64,6 +64,7 @@ #include "BKE_armature.h" #include "BKE_camera.h" #include "BKE_context.h" +#include "BKE_constraint.h" #include "BKE_curve.h" #include "BKE_depsgraph.h" #include "BKE_DerivedMesh.h" @@ -1377,7 +1378,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base, ob->proxy = NULL; ob->parent = NULL; - BLI_listbase_clear(&ob->constraints); + BKE_constraints_free(&ob->constraints); ob->curve_cache = NULL; ob->transflag &= ~OB_DUPLI; ob->lay = base->lay; |