shader_glsl.c: Move buffer null pointer check in gl_glsl_set_coords()
`buffer` is initialized to a statically allocated variable and can only be NULL when the allocation of a bigger buffer fails. When only the core frame is being displayed, the buffer never points to the heap thanks to the small buffer optimization.
This commit is contained in:
parent
9dca8de90f
commit
1f45018ee8
|
@ -1443,10 +1443,10 @@ static bool gl_glsl_set_coords(void *shader_data,
|
|||
elems *= coords->vertices * sizeof(GLfloat);
|
||||
|
||||
buffer = (GLfloat*)malloc(elems);
|
||||
}
|
||||
|
||||
if (!buffer)
|
||||
return false;
|
||||
if (!buffer)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (uni->tex_coord >= 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue