[Bf-blender-cvs] [4a68ff1] master: Fix T49903: Blender crashes -> Append Group incl. Object using boolean modifier
Bastien Montagne
noreply at git.blender.org
Thu Nov 3 21:11:26 CET 2016
Commit: 4a68ff150f47bfeb4d4252473b2b906d14f091c5
Author: Bastien Montagne
Date: Thu Nov 3 21:06:10 2016 +0100
Branches: master
https://developer.blender.org/rB4a68ff150f47bfeb4d4252473b2b906d14f091c5
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.
===================================================================
M source/blender/blenkernel/intern/library.c
===================================================================
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 622f79d..5d28a84 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;
}
}
More information about the Bf-blender-cvs
mailing list