Fix T97289: Linked collection assets disappear.
After appending, new link/append code would delete linked IDs, even if those where pre-existing. Note that this would actually lead to invalid memory access later in append code (ASAN crash).
This commit is contained in:
@@ -1187,6 +1187,11 @@ void BKE_blendfile_append(BlendfileLinkAppendContext *lapp_context, ReportList *
|
||||
BLI_assert(ID_IS_LINKED(id));
|
||||
BLI_assert(id->newid != NULL);
|
||||
|
||||
/* Do NOT delete a linked data that was already linked before this append. */
|
||||
if (id->tag & LIB_TAG_PRE_EXISTING) {
|
||||
continue;
|
||||
}
|
||||
|
||||
id->tag |= LIB_TAG_DOIT;
|
||||
item->new_id = id->newid;
|
||||
}
|
||||
|
Reference in New Issue
Block a user