From 11e48277386c1811507878e3ffe7f7e10e26ac20 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 12 Mar 2020 18:05:20 +0100 Subject: 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. --- source/blender/blenkernel/intern/lib_id.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/blenkernel') 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); -- cgit v1.2.3