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.
This commit is contained in:
Bastien Montagne 2017-06-15 12:49:40 +02:00
parent 7853ebc204
commit 2bd51474a4
Notes: blender-bot 2023-02-14 06:45:14 +01:00
Referenced by commit 9e0a253ea1, Cleanup: make Group Unlink outliner action use `BKE_libblock_delete() too.
1 changed files with 1 additions and 2 deletions

View File

@ -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);