From 4a68ff150f47bfeb4d4252473b2b906d14f091c5 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 3 Nov 2016 21:06:10 +0100 Subject: Fix T49903: Blender crashes -> Append Group incl. Object using boolean modifier New code dealing with getting rid of lib-only cycles of data-blocks could add several time the same datablock to the list of candidates. Now this is avoided, and pointers are further cleaned up as double-safety measure. --- source/blender/blenkernel/intern/library.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/blenkernel/intern/library.c') diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 622f79df4ee..5d28a84ef18 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -1778,7 +1778,8 @@ void BKE_library_make_local( it->link = NULL; do_loop = true; } - else { /* Only used by linked data, potential candidate to ugly lib-only dependency cycles... */ + /* Only used by linked data, potential candidate to ugly lib-only dependency cycles... */ + else if ((id->tag & LIB_TAG_DOIT) == 0) { /* Check TAG_DOIT to avoid adding same ID several times... */ /* Note that we store the node, not directly ID pointer, that way if it->link is set to NULL * later we can skip it in lib-dependency cycles search later. */ BLI_linklist_prepend_arena(&linked_loop_candidates, it, linklist_mem); @@ -1821,6 +1822,7 @@ void BKE_library_make_local( BKE_libblock_unlink(bmain, id, false, false); BKE_libblock_free(bmain, id); #endif + ((LinkNode *)it->link)->link = NULL; /* Not strictly necessary, but safer (see T49903)... */ it->link = NULL; } } -- cgit v1.2.3