Fix: action's actual users and recorded user count could diverge
The user count decrement and unassigning the action were split between two different conditionals, which weren't guaranteed to both execute/not-execute together.
This commit is contained in:
@@ -137,14 +137,13 @@ bool BKE_animdata_set_action(ReportList *reports, ID *id, bAction *act)
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Reduce user-count for current action. */
|
||||
/* Unassign current action. */
|
||||
if (adt->action) {
|
||||
id_us_min((ID *)adt->action);
|
||||
adt->action = NULL;
|
||||
}
|
||||
|
||||
if (act == NULL) {
|
||||
/* Just clearing the action. */
|
||||
adt->action = NULL;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user