gal/opengl: Fix shader link state check
The old code caused a bool (size 1) to be overwritten by a GLint (size 4) causing undefined behaviour. Fixes https://gitlab.com/kicad/code/kicad/issues/3981
This commit is contained in:
parent
9769e1020b
commit
349c0e1a14
|
@ -101,8 +101,9 @@ bool SHADER::Link()
|
|||
programInfo( programNumber );
|
||||
|
||||
// Check the Link state
|
||||
glGetObjectParameterivARB( programNumber, GL_OBJECT_LINK_STATUS_ARB,
|
||||
(GLint*) &isShaderLinked );
|
||||
GLint tmp;
|
||||
glGetObjectParameterivARB( programNumber, GL_OBJECT_LINK_STATUS_ARB, &tmp );
|
||||
isShaderLinked = !!tmp;
|
||||
|
||||
#ifdef DEBUG
|
||||
if( !isShaderLinked )
|
||||
|
|
Loading…
Reference in New Issue