1
1

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:
2022-04-13 10:25:53 +02:00
parent 4a70561bbd
commit a63982a65b

View File

@@ -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;
}