Attempt to fix T45718, crash when enabling GLSL mode with UV layers.
I can't reproduce issue here but crash is most likely caused by passing a NULL pointer to glUniform2fv. This is caused by OpenSubdiv changes to the codegen module, which pass mtex layers to the uniform system even when not needed. Since Sergey is demoing OpenSubdiv in a few days, I'll go with the easy fix for now which is just checking for NULL pointer, but this needs to be fixed properly at some point.
This commit is contained in:
parent
9becee445e
commit
c30c3fde51
Notes:
blender-bot
2023-02-14 08:47:29 +01:00
Referenced by issue #45718, Blender crashes when I set Material in Viewport shading
|
@ -1932,7 +1932,7 @@ int GPU_shader_get_uniform(GPUShader *shader, const char *name)
|
|||
|
||||
void GPU_shader_uniform_vector(GPUShader *UNUSED(shader), int location, int length, int arraysize, const float *value)
|
||||
{
|
||||
if (location == -1)
|
||||
if (location == -1 || value == NULL)
|
||||
return;
|
||||
|
||||
GPU_ASSERT_NO_GL_ERRORS("Pre Uniform Vector");
|
||||
|
|
Loading…
Reference in New Issue