diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index 933c25b7dbd..0c0b48dccc7 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -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++; }