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
Notes: blender-bot 2023-02-14 03:10:59 +01:00
Referenced by issue #63115, crash upon switching to textured/rendered mode
1 changed files with 4 additions and 1 deletions

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