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:
parent
4a70561bbd
commit
a63982a65b
Notes:
blender-bot
2024-04-11 14:26:06 +02:00
Referenced by issue #97289, Linked collection assets disappear
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue