diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-12-25 23:40:00 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-12-25 23:40:00 +0300 |
commit | be679703032e28190d0c7357de6b67449b78834f (patch) | |
tree | 8c7ffcde7305259c213e0652f161c30ac17ccc95 /source/blender/editors/mesh | |
parent | 6c6786f1f0718a4ec1a3589c8669e8762230110e (diff) |
fix for [#20244] importing .obj without "Object" option checked crashes blender
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/mesh_data.c | 3 |
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); } |