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 <montagne29@wanadoo.fr>2018-03-18 18:05:02 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-03-18 18:05:02 +0300
commite95282e783f2cebb700c354ad181dd5efce50d04 (patch)
treec775ea102783f363b90469f2cf5ba2bad1da4f79 /source/blender/editors/mesh/meshtools.c
parent4a3d94c0734d1475aa9a2fbe89039fbc59c9fb8d (diff)
parent0301df40e5b6c51575d7f9013a1a28b901063829 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/mesh/meshtools.c')
-rw-r--r--source/blender/editors/mesh/meshtools.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index 2e75276cd8f..fd5beac9cc6 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -560,12 +560,10 @@ int join_mesh_exec(bContext *C, wmOperator *op)
if (ma)
id_us_min(&ma->id);
}
- if (ob->mat) MEM_freeN(ob->mat);
- if (ob->matbits) MEM_freeN(ob->matbits);
- if (me->mat) MEM_freeN(me->mat);
- ob->mat = me->mat = NULL;
- ob->matbits = NULL;
-
+ MEM_SAFE_FREE(ob->mat);
+ MEM_SAFE_FREE(ob->matbits);
+ MEM_SAFE_FREE(me->mat);
+
if (totcol) {
me->mat = matar;
ob->mat = MEM_callocN(sizeof(*ob->mat) * totcol, "join obmatar");