Bugfix #20942: Unassigned Vertex Groups crash Blender on sort

This commit fixes the crash, but it seems that the sorting doesn't work correctly with or without any vertices assigned.
This commit is contained in:
Joshua Leung 2010-02-03 02:31:29 +00:00
parent 0ff879af73
commit 2c5ef58b8b

@ -1872,7 +1872,7 @@ static int vertex_group_sort_exec(bContext *C, wmOperator *op)
}
ED_vgroup_give_array(ob->data, &dvert, &dvert_tot);
while(dvert_tot--) {
while(dvert && dvert_tot--) {
defvert_remap(dvert, sort_map);
dvert++;
}