diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-05-29 18:44:39 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-05-29 18:44:39 +0300 |
commit | f212bfa3cd570f319efb9d5ab6ce4fe89cc453d4 (patch) | |
tree | 144df8f7782ac4b7fddfd762a10f7698129ec948 | |
parent | 06ca2c9d0320a4a4beae3c6ca5576ed208331dcb (diff) |
Fix T51657: ID user count error when deleting a newly created object with an assigned dupli_group
Stupid RNA accessor was not handling usercount at all on Object.dupli_group...
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 7fc6aab7885..a167ab03ba1 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -528,8 +528,9 @@ static void rna_Object_dup_group_set(PointerRNA *ptr, PointerRNA value) * thus causing a cycle/infinite-recursion leading to crashes on load [#25298] */ if (BKE_group_object_exists(grp, ob) == 0) { + id_us_min(&ob->dup_group->id); ob->dup_group = grp; - id_lib_extern((ID *)grp); + id_us_plus(&ob->dup_group->id); } else { BKE_report(NULL, RPT_ERROR, |