Fix #19618: invalid vertex group data could be created when

assign vertices without an existing vertex group, causing e.g.
armature modifiers to crash.
This commit is contained in:
Brecht Van Lommel 2009-10-19 17:11:42 +00:00
parent 7cc9998eb4
commit 48f3e3340a
2 changed files with 3 additions and 1 deletions

@ -88,7 +88,7 @@ class DATA_PT_vertex_groups(DataButtonsPanel):
row = layout.row()
row.itemR(group, "name")
if ob.mode == 'EDIT':
if ob.mode == 'EDIT' and len(ob.vertex_groups) > 0:
row = layout.row()
sub = row.row(align=True)

@ -876,6 +876,8 @@ static void vgroup_assign_verts(Object *ob, float weight)
int i, done;
dg=BLI_findlink(&ob->defbase, ob->actdef-1);
if(!dg)
return;
if(ob->type == OB_MESH) {
Mesh *me= ob->data;