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:
Diffstat (limited to 'source/blender/editors/mesh/meshtools.c')
-rw-r--r--source/blender/editors/mesh/meshtools.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index 2491685161c..dee003135a2 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -513,11 +513,13 @@ int join_mesh_exec(bContext *C, wmOperator *op)
/* old material array */
for (a = 1; a <= ob->totcol; a++) {
ma = ob->mat[a - 1];
- if (ma) ma->id.us--;
+ if (ma)
+ id_us_min(&ma->id);
}
for (a = 1; a <= me->totcol; a++) {
ma = me->mat[a - 1];
- if (ma) ma->id.us--;
+ if (ma)
+ id_us_min(&ma->id);
}
if (ob->mat) MEM_freeN(ob->mat);
if (ob->matbits) MEM_freeN(ob->matbits);