diff options
Diffstat (limited to 'source/blender/editors/object/object_group.c')
-rw-r--r-- | source/blender/editors/object/object_group.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c index 7bf1a5db3b1..9b683a1ba98 100644 --- a/source/blender/editors/object/object_group.c +++ b/source/blender/editors/object/object_group.c @@ -311,7 +311,7 @@ static int group_create_exec(bContext *C, wmOperator *op) RNA_string_get(op->ptr, "name", name); - group = add_group(name); + group = add_group(bmain, name); CTX_DATA_BEGIN (C, Base *, base, selected_bases) { @@ -348,12 +348,13 @@ static int group_add_exec(bContext *C, wmOperator *UNUSED(op)) { Scene *scene = CTX_data_scene(C); Object *ob = ED_object_context(C); + Main *bmain = CTX_data_main(C); Group *group; if (ob == NULL) return OPERATOR_CANCELLED; - group = add_group("Group"); + group = add_group(bmain, "Group"); add_to_group(group, ob, scene, NULL); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); |