diff --git a/release/scripts/ui/buttons_data_mesh.py b/release/scripts/ui/buttons_data_mesh.py index 76c66f7aece..3c8f655f17a 100644 --- a/release/scripts/ui/buttons_data_mesh.py +++ b/release/scripts/ui/buttons_data_mesh.py @@ -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) diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index dd3e5969a75..0de1c79b796 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -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;