diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-03-30 06:20:25 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-03-30 06:20:35 +0300 |
commit | 024d02256e652c944ff259b1ed4327b1b160e335 (patch) | |
tree | b019ccae615f484ae3f74acc6c412dcde48361aa /source/blender/nodes/shader | |
parent | 98f00a3eb526ba0f39c907a53a756adf589dc1dd (diff) |
Fix T63115 crash upon switching to textured/rendered mode
Diffstat (limited to 'source/blender/nodes/shader')
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_tex_coord.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_coord.c b/source/blender/nodes/shader/nodes/node_shader_tex_coord.c index dfd5a46d4c7..5a7a81f57bd 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_coord.c +++ b/source/blender/nodes/shader/nodes/node_shader_tex_coord.c @@ -37,7 +37,10 @@ static bNodeSocketTemplate sh_node_tex_coord_out[] = { static int node_shader_gpu_tex_coord(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) { Object *ob = (Object *)node->id; - invert_m4_m4(ob->imat, ob->obmat); + + if (ob != NULL) { + invert_m4_m4(ob->imat, ob->obmat); + } GPUNodeLink *inv_obmat = (ob != NULL) ? GPU_uniform(&ob->imat[0][0]) : GPU_builtin(GPU_INVERSE_OBJECT_MATRIX); |