[Bf-blender-cvs] [024d02256e6] master: Fix T63115 crash upon switching to textured/rendered mode
Clément Foucault
noreply at git.blender.org
Sat Mar 30 04:20:37 CET 2019
Commit: 024d02256e652c944ff259b1ed4327b1b160e335
Author: Clément Foucault
Date: Sat Mar 30 04:20:25 2019 +0100
Branches: master
https://developer.blender.org/rB024d02256e652c944ff259b1ed4327b1b160e335
Fix T63115 crash upon switching to textured/rendered mode
===================================================================
M source/blender/nodes/shader/nodes/node_shader_tex_coord.c
===================================================================
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);
More information about the Bf-blender-cvs
mailing list