Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2015-08-07 17:16:23 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-08-07 17:16:23 +0300
commitc30c3fde51fb5ca6780ef436678c9d4aa07f400c (patch)
tree4bc333b2750b936dc70b9707547c09628baf238c /source/blender/gpu/intern/gpu_extensions.c
parent9becee445ee525a7831e28567f041b4477d0c9ba (diff)
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.
Diffstat (limited to 'source/blender/gpu/intern/gpu_extensions.c')
-rw-r--r--source/blender/gpu/intern/gpu_extensions.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index c6bee77f451..d9112acfdaa 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -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");