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:
Bastien Montagne
2020-02-18 14:29:28 +01:00
parent e3e6dc41a7
commit ce33388413

View File

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