diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-04-17 23:33:07 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-04-17 23:33:07 +0300 |
commit | 4d0d1b5936c59b6e7ce5b3ae8b1af617cbdada61 (patch) | |
tree | 573021ee96e0b3f21b480a4a3b95886fd374123b /source | |
parent | 4621392353c24124a8fe9dc0d5a86c9331a7a0c1 (diff) |
Fix T51150: user_remap on itself changes users to 0.
Remapping to itself is nonsense here (was triggering an assert in
BKE_library code actually), just make it a bail out early in RNA
callback in that case.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_ID.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index 6ed2c55138c..a74758a4f71 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -342,7 +342,7 @@ static void rna_ID_user_clear(ID *id) static void rna_ID_user_remap(ID *id, Main *bmain, ID *new_id) { - if (GS(id->name) == GS(new_id->name)) { + if ((GS(id->name) == GS(new_id->name)) && (id != new_id)) { /* For now, do not allow remapping data in linked data from here... */ BKE_libblock_remap(bmain, id, new_id, ID_REMAP_SKIP_INDIRECT_USAGE | ID_REMAP_SKIP_NEVER_NULL_USAGE); } |