diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-07-02 21:12:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-07-02 21:12:41 +0400 |
commit | afd2c5c0835204a91b63c7b220c73040bdb03ad5 (patch) | |
tree | 677547f4573e2984f1825125d09b1122c1ed2a3f /source/blender/editors/object | |
parent | 33ae33bd109d43cedc901bbe40b02aec777e8f37 (diff) |
fix for crash getting GROUP_OT_objects_remove's props without a context (own fault)
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_group.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c index 48104c9274d..c9851c6a0db 100644 --- a/source/blender/editors/object/object_group.c +++ b/source/blender/editors/object/object_group.c @@ -237,7 +237,7 @@ static int group_objects_remove_exec(bContext *C, wmOperator *op) /* can be called with C == NULL */ static EnumPropertyItem *group_objects_remove_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free) { - Object *ob = ED_object_context(C); + Object *ob; EnumPropertyItem *item = NULL, item_tmp = {0}; int totitem = 0; @@ -245,6 +245,8 @@ static EnumPropertyItem *group_objects_remove_itemf(bContext *C, PointerRNA *UNU return DummyRNA_NULL_items; } + ob = ED_object_context(C); + /* check that the action exists */ if (ob) { Group *group = NULL; |