diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-10-23 12:59:53 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-10-23 13:00:46 +0300 |
commit | f927f388f6608cb802b489907ef0c280607d900c (patch) | |
tree | b922f7c47467373c1127a235a92d9b8e04492a5b /source/blender | |
parent | 6d1fd1dc58120cd3cd4193cc50958095af198627 (diff) |
Fix T57288: Assert when deleting duplicated collection (id->us == 0).
Copying an ID also add a default user to new one (just like creating an
ID), by default...
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/collection.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c index 54ce5223756..ece79fe4b37 100644 --- a/source/blender/blenkernel/intern/collection.c +++ b/source/blender/blenkernel/intern/collection.c @@ -231,6 +231,7 @@ Collection *BKE_collection_copy(Main *bmain, Collection *parent, Collection *col Collection *collection_new; BKE_id_copy_ex(bmain, &collection->id, (ID **)&collection_new, 0, false); + id_us_min(collection_new); /* Copying add one user by default, need to get rid of that one. */ /* Optionally add to parent. */ if (parent) { |