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:
authorCampbell Barton <ideasman42@gmail.com>2012-08-14 16:17:06 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-14 16:17:06 +0400
commit34ebdcacfc26b7c42aa6c0aa4c03bf8aee72abac (patch)
tree17da4dd1c4e7177a67f12d52711496eff2151767 /source/blender/blenkernel/intern
parent53333c78ce113ef1c47e2b6dbdad0912b0038712 (diff)
fix for recent commit - would crash adding materials on an object without any.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/material.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 71e3feb9ced..21811c19d24 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -808,7 +808,7 @@ void assign_material(Object *ob, Material *ma, short act, int assign_type)
}
// Determine the object/mesh linking
- if (assign_type == BKE_MAT_ASSIGN_USERPREF && ob->actcol) {
+ if (assign_type == BKE_MAT_ASSIGN_USERPREF && ob->totcol && ob->actcol) {
/* copy from previous material */
bit = ob->matbits[ob->actcol - 1];
}