Fix memory leak when making duplicates real and parent had constraints

Thanks Bastien for help!
This commit is contained in:
Sergey Sharybin 2017-02-27 17:46:21 +01:00
parent 2342cd0a0f
commit cd5c853307
1 changed files with 2 additions and 1 deletions

View File

@ -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;