diff options
author | Bastien Montagne <b.mont29@gmail.com> | 2020-02-18 16:29:28 +0300 |
---|---|---|
committer | Bastien Montagne <b.mont29@gmail.com> | 2020-02-18 16:38:33 +0300 |
commit | ce33388413a995c5791f4d768a6c7e41be470d5d (patch) | |
tree | fcd11f4468ef3ff0f5bc15123cae650e17f0db9e /source/blender | |
parent | e3e6dc41a77a2537b34e7f3699996b6b8a70542d (diff) |
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.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/workspace.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/workspace.c b/source/blender/blenkernel/intern/workspace.c index cd1bae6d798..6e923822f7d 100644 --- a/source/blender/blenkernel/intern/workspace.c +++ b/source/blender/blenkernel/intern/workspace.c @@ -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; } |