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')
-rw-r--r--source/blender/blenkernel/intern/mesh.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index 7b415cff555..f0566a7f473 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -424,11 +424,12 @@ void BKE_mesh_unlink(Mesh *me)
int a;
if (me == NULL) return;
-
- if (me->mat)
- for (a = 0; a < me->totcol; a++) {
- if (me->mat[a]) me->mat[a]->id.us--;
- me->mat[a] = NULL;
+
+ if (me->mat) {
+ for (a = 0; a < me->totcol; a++) {
+ if (me->mat[a]) me->mat[a]->id.us--;
+ me->mat[a] = NULL;
+ }
}
if (me->key) {