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:
@@ -88,7 +88,7 @@ class DATA_PT_vertex_groups(DataButtonsPanel):
|
|||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.itemR(group, "name")
|
row.itemR(group, "name")
|
||||||
|
|
||||||
if ob.mode == 'EDIT':
|
if ob.mode == 'EDIT' and len(ob.vertex_groups) > 0:
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
|
|
||||||
sub = row.row(align=True)
|
sub = row.row(align=True)
|
||||||
|
|||||||
@@ -876,6 +876,8 @@ static void vgroup_assign_verts(Object *ob, float weight)
|
|||||||
int i, done;
|
int i, done;
|
||||||
|
|
||||||
dg=BLI_findlink(&ob->defbase, ob->actdef-1);
|
dg=BLI_findlink(&ob->defbase, ob->actdef-1);
|
||||||
|
if(!dg)
|
||||||
|
return;
|
||||||
|
|
||||||
if(ob->type == OB_MESH) {
|
if(ob->type == OB_MESH) {
|
||||||
Mesh *me= ob->data;
|
Mesh *me= ob->data;
|
||||||
|
|||||||
Reference in New Issue
Block a user