Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <jeroen@blender.org>2021-03-08 10:47:22 +0300
committerJeroen Bakker <jeroen@blender.org>2021-03-08 10:47:22 +0300
commitcbf033c05519ffa977693a5f6845b476017af08b (patch)
treeb734390cd622b72fd7d4d8dd37a5fcae3a0f54eb /source/blender/blenkernel/intern/node.cc
parent89757f918cfa9e087f1a55f7c94688a1f623b612 (diff)
Fix T86026: Crash Opening Cryptomatte File.
But this time the root cause. Writing undo files is done in a separate thread. This patch moved the updating of the matte_id when the user actually changes the matte.
Diffstat (limited to 'source/blender/blenkernel/intern/node.cc')
-rw-r--r--source/blender/blenkernel/intern/node.cc9
1 files changed, 1 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc
index 6b46ae3430b..c2ce52b1358 100644
--- a/source/blender/blenkernel/intern/node.cc
+++ b/source/blender/blenkernel/intern/node.cc
@@ -540,18 +540,11 @@ void ntreeBlendWrite(BlendWriter *writer, bNodeTree *ntree)
}
else if ((ntree->type == NTREE_COMPOSIT) && (node->type == CMP_NODE_CRYPTOMATTE)) {
NodeCryptomatte *nc = (NodeCryptomatte *)node->storage;
- /* Update the matte_id so the files can be opened in versions that don't
- * use `CryptomatteEntry`. */
- MEM_SAFE_FREE(nc->matte_id);
- nc->matte_id = BKE_cryptomatte_entries_to_matte_id(nc);
- if (nc->matte_id) {
- BLO_write_string(writer, nc->matte_id);
- }
+ BLO_write_string(writer, nc->matte_id);
LISTBASE_FOREACH (CryptomatteEntry *, entry, &nc->entries) {
BLO_write_struct(writer, CryptomatteEntry, entry);
}
BLO_write_struct_by_name(writer, node->typeinfo->storagename, node->storage);
- MEM_SAFE_FREE(nc->matte_id);
}
else if (node->type == FN_NODE_INPUT_STRING) {
NodeInputString *storage = (NodeInputString *)node->storage;