From 2bd51474a440aaa2f3a7a90b2e3da663f2fc1f42 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 15 Jun 2017 12:49:40 +0200 Subject: 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. --- source/blender/editors/object/object_group.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source/blender/editors/object/object_group.c') 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); -- cgit v1.2.3