diff options
author | Jacques Lucke <jacques@blender.org> | 2020-08-25 12:23:35 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-08-25 12:23:35 +0300 |
commit | 8bb93ca80a3a5f94c81af96739039b1608ac02c7 (patch) | |
tree | 706e449614f6c54551fb76385957b7cee51517cf /source/blender/editors | |
parent | 141a8ff6b3b1170d5551ef08895f1b7fac145235 (diff) |
Fix T79915: crash when changing to white noise texture
Reviewers: brecht, OmarSquircleArt
Differential Revision: https://developer.blender.org/D8697
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_node/node_templates.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c index 4f15cec8c84..654bb94cc78 100644 --- a/source/blender/editors/space_node/node_templates.c +++ b/source/blender/editors/space_node/node_templates.c @@ -281,7 +281,9 @@ static void node_socket_add_replace(const bContext *C, /* also preserve mapping for texture nodes */ if (node_from->typeinfo->nclass == NODE_CLASS_TEXTURE && - node_prev->typeinfo->nclass == NODE_CLASS_TEXTURE) { + node_prev->typeinfo->nclass == NODE_CLASS_TEXTURE && + /* White noise texture node does not have NodeTexBase. */ + node_from->storage != NULL && node_prev->storage != NULL) { memcpy(node_from->storage, node_prev->storage, sizeof(NodeTexBase)); } |