diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2019-03-08 15:40:32 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2019-03-08 15:43:12 +0300 |
commit | af53c3b13560add40db452900999363ea4dd5fae (patch) | |
tree | 5fe37f9fc1d79fa90a73a6c830596c584fd51735 /source/blender/blenloader/intern/readfile.c | |
parent | 0d395ebb6c2b2c5bfb9063a91f66036e71c1ebf2 (diff) |
Fix crash reloading images used in compositor node
Similar to what Brecht committed in
38f0d5f75af7d2f30156f4008dc5bc8d8394fbf3.
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index e5d4da8db10..49c62372a85 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -3616,9 +3616,11 @@ static void direct_link_nodetree(FileData *fd, bNodeTree *ntree) else if (ntree->type == NTREE_COMPOSIT) { if (ELEM(node->type, CMP_NODE_TIME, CMP_NODE_CURVE_VEC, CMP_NODE_CURVE_RGB, CMP_NODE_HUECORRECT)) direct_link_curvemapping(fd, node->storage); - else if (ELEM(node->type, CMP_NODE_IMAGE, CMP_NODE_R_LAYERS, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)) - ((ImageUser *)node->storage)->ok = 1; - else if (node->type == CMP_NODE_CRYPTOMATTE) { + else if (ELEM(node->type, CMP_NODE_IMAGE, CMP_NODE_R_LAYERS, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)) { + ImageUser *iuser = node->storage; + iuser->ok = 1; + iuser->scene = NULL; + } else if (node->type == CMP_NODE_CRYPTOMATTE) { NodeCryptomatte *nc = (NodeCryptomatte *)node->storage; nc->matte_id = newdataadr(fd, nc->matte_id); } |