[Bf-blender-cvs] [11e48277386] master: Fix T74670: crash during copy paste of objects.
Bastien Montagne
noreply at git.blender.org
Thu Mar 12 18:08:17 CET 2020
Commit: 11e48277386c1811507878e3ffe7f7e10e26ac20
Author: Bastien Montagne
Date: Thu Mar 12 18:05:20 2020 +0100
Branches: master
https://developer.blender.org/rB11e48277386c1811507878e3ffe7f7e10e26ac20
Fix T74670: crash during copy paste of objects.
Embedded data should always be considered as outside of Main database
here.
Note that it's a bit of an edge case to decide whether those should
always have their `LIB_TAG_NOMAIN` set too, or not? For now, let's keep
things as they are here.
===================================================================
M source/blender/blenkernel/intern/lib_id.c
===================================================================
diff --git a/source/blender/blenkernel/intern/lib_id.c b/source/blender/blenkernel/intern/lib_id.c
index c342185d0b8..27d4b8dd047 100644
--- a/source/blender/blenkernel/intern/lib_id.c
+++ b/source/blender/blenkernel/intern/lib_id.c
@@ -162,7 +162,8 @@ static void lib_id_clear_library_data_ex(Main *bmain, ID *id)
{
bNodeTree *ntree = NULL;
Key *key = NULL;
- const bool id_in_mainlist = (id->tag & LIB_TAG_NO_MAIN) == 0;
+ const bool id_in_mainlist = (id->tag & LIB_TAG_NO_MAIN) == 0 &&
+ (id->flag & LIB_EMBEDDED_DATA) == 0;
lib_id_library_local_paths(bmain, id->lib, id);
More information about the Bf-blender-cvs
mailing list