Fix T63115 crash upon switching to textured/rendered mode

This commit is contained in:
Clément Foucault
2019-03-30 04:20:25 +01:00
parent 98f00a3eb5
commit 024d02256e

View File

@@ -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);