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:
authorBastien Montagne <montagne29@wanadoo.fr>2017-06-01 13:18:57 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-06-01 13:18:57 +0300
commit528ae8885ebb8a2eebbc6726af3950ca4db38665 (patch)
tree67ec22c05690cf0edcbd66ab840998a6273cc271 /source/blender/nodes/intern
parente2b1c70b487aa61f59d57fbde61df0ce30aded20 (diff)
Fix T51687: GPUmat evaluation of shader tree would crash uppon unknown/unsupported socket types.
Made this resilient to unknown types, for now. Supporting specific INT sockets (through implicit conversion to GPU_FLOAT ones) is considered nice TODO.
Diffstat (limited to 'source/blender/nodes/intern')
-rw-r--r--source/blender/nodes/intern/node_exec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/nodes/intern/node_exec.c b/source/blender/nodes/intern/node_exec.c
index 2347564c696..0cf131adbdc 100644
--- a/source/blender/nodes/intern/node_exec.c
+++ b/source/blender/nodes/intern/node_exec.c
@@ -78,7 +78,8 @@ void node_get_stack(bNode *node, bNodeStack *stack, bNodeStack **in, bNodeStack
static void node_init_input_index(bNodeSocket *sock, int *index)
{
- if (sock->link && sock->link->fromsock) {
+ /* Only consider existing link if from socket is valid! */
+ if (sock->link && sock->link->fromsock && sock->link->fromsock->stack_index >= 0) {
sock->stack_index = sock->link->fromsock->stack_index;
}
else {