fix for [#20244] importing .obj without "Object" option checked crashes blender

This commit is contained in:
2009-12-25 20:40:00 +00:00
parent 6c6786f1f0
commit be67970303
2 changed files with 3 additions and 2 deletions

View File

@@ -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);
}