diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-10-31 20:44:24 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-10-31 20:44:24 +0400 |
commit | bdb279ec5b4f8537bc30a54bef814bd47f2aef1e (patch) | |
tree | 888160c5c8a90b8f961c8d5d443ffe221022da0e /source/blender/nodes/texture | |
parent | 56421d869dd080c0c3e715736dbc6de6e03526e5 (diff) |
Fix crash in texture nodes, when no derivatives available, other nodes already
did this check.
Diffstat (limited to 'source/blender/nodes/texture')
-rw-r--r-- | source/blender/nodes/texture/nodes/node_texture_texture.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/nodes/texture/nodes/node_texture_texture.c b/source/blender/nodes/texture/nodes/node_texture_texture.c index 2d543470342..1b8eb3aabc6 100644 --- a/source/blender/nodes/texture/nodes/node_texture_texture.c +++ b/source/blender/nodes/texture/nodes/node_texture_texture.c @@ -54,8 +54,14 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor float co[3], dxt[3], dyt[3]; copy_v3_v3(co, p->co); - copy_v3_v3(dxt, p->dxt); - copy_v3_v3(dyt, p->dyt); + if (p->osatex) { + copy_v3_v3(dxt, p->dxt); + copy_v3_v3(dyt, p->dyt); + } + else { + zero_v3(dxt); + zero_v3(dyt); + } if(node->custom2 || node->need_exec==0) { /* this node refers to its own texture tree! */ |