Fix (unreported) wrong handling of usercount in BKE_workspace_add()
.
This does not seem to be an actual issue in current master code (as creating a new ID will assign 1 user to it by default), but is breaking generic usercount handling in future changes.
This commit is contained in:
@@ -146,6 +146,7 @@ static bool UNUSED_FUNCTION(workspaces_is_screen_used)
|
||||
WorkSpace *BKE_workspace_add(Main *bmain, const char *name)
|
||||
{
|
||||
WorkSpace *new_workspace = BKE_libblock_alloc(bmain, ID_WS, name, 0);
|
||||
id_us_ensure_real(&new_workspace->id);
|
||||
return new_workspace;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user