Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2017-06-15 13:49:40 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-06-15 13:49:40 +0300
commit2bd51474a440aaa2f3a7a90b2e3da663f2fc1f42 (patch)
tree29847578c1b5eb11d4d1d0fda03b4659c9ac9a09 /source/blender/editors/object
parent7853ebc204238a660b57431cd86ae113ae58c3a0 (diff)
Cleanup: make Group Unlink operator use BKE_libblock_delete(), since that's what it is doing.
Previous code (same as what `BKE_libblock_free_us()` is doing when usercount reach 0) was probably OK in that specific case, but still not good idea, and potentially risky.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_group.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c
index 0fe43c44d7d..568778c0a86 100644
--- a/source/blender/editors/object/object_group.c
+++ b/source/blender/editors/object/object_group.c
@@ -528,8 +528,7 @@ static int group_unlink_exec(bContext *C, wmOperator *UNUSED(op))
if (!group)
return OPERATOR_CANCELLED;
- BKE_libblock_unlink(bmain, group, false, false);
- BKE_libblock_free(bmain, group);
+ BKE_libblock_delete(bmain, group);
WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, NULL);