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 );
|
programInfo( programNumber );
|
||||||
|
|
||||||
// Check the Link state
|
// Check the Link state
|
||||||
glGetObjectParameterivARB( programNumber, GL_OBJECT_LINK_STATUS_ARB,
|
GLint tmp;
|
||||||
(GLint*) &isShaderLinked );
|
glGetObjectParameterivARB( programNumber, GL_OBJECT_LINK_STATUS_ARB, &tmp );
|
||||||
|
isShaderLinked = !!tmp;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if( !isShaderLinked )
|
if( !isShaderLinked )
|
||||||
|
|
Loading…
Reference in New Issue