coverity issue CID: 275

Checker: FORWARD_NULL (help)
File: base/src/source/blender/gpu/intern/gpu_extensions.c
Function: GPU_shader_create
Description: Variable "fragcode" tracked as NULL was passed to a function that dereferences it.

fix provided by Brecht. :)

Kent
This commit is contained in:
Kent Mein 2009-06-13 22:31:14 +00:00
parent 472239cc94
commit bde991df9e

@ -746,7 +746,9 @@ GPUShader *GPU_shader_create(const char *vertexcode, const char *fragcode, /*GPU
glGetObjectParameterivARB(shader->object, GL_OBJECT_LINK_STATUS_ARB, &status);
if (!status) {
glGetInfoLogARB(shader->object, sizeof(log), &length, log);
shader_print_errors("linking", log, fragcode);
if (fragecode) shader_print_errors("linking", log, fragcode);
else if (vertexcode) shader_print_errors("linking", log, vertexcode);
else if (libcode) shader_print_errors("linking", log, libcode);
GPU_shader_free(shader);
return NULL;