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>2009-12-25 23:40:00 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-12-25 23:40:00 +0300
commitbe679703032e28190d0c7357de6b67449b78834f (patch)
tree8c7ffcde7305259c213e0652f161c30ac17ccc95 /source/blender/editors/mesh/mesh_data.c
parent6c6786f1f0718a4ec1a3589c8669e8762230110e (diff)
fix for [#20244] importing .obj without "Object" option checked crashes blender
Diffstat (limited to 'source/blender/editors/mesh/mesh_data.c')
-rw-r--r--source/blender/editors/mesh/mesh_data.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c
index 1cdc059f57e..050152821f5 100644
--- a/source/blender/editors/mesh/mesh_data.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@ -676,7 +676,8 @@ void ED_mesh_material_add(Mesh *me, Material *ma)
me->mat = mat;
me->mat[me->totcol++] = ma;
- ma->id.us++;
+ if(ma)
+ ma->id.us++;
test_object_materials((ID*)me);
}