diff options
-rw-r--r-- | source/blender/gpu/intern/gpu_codegen.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c index bc91df895c8..9e4daa2a036 100644 --- a/source/blender/gpu/intern/gpu_codegen.c +++ b/source/blender/gpu/intern/gpu_codegen.c @@ -1589,6 +1589,15 @@ static GPUNodeLink *gpu_uniformbuffer_link( GPUMaterial *mat, bNode *node, GPUNodeStack *stack, const int index, const eNodeSocketInOut in_out) { bNodeSocket *socket; + + /* Some nodes can have been create on the fly and does + * not have an original to point to. (i.e. the bump from + * ntree_shader_relink_displacement). In this case just + * revert to static constant folding. */ + if (node->original == NULL) { + return NULL; + } + if (in_out == SOCK_IN) { socket = BLI_findlink(&node->original->inputs, index); } |