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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user