Check pipeline is valid. See g-truc gl-320-caps

* If no program or pipeline is bound, need to make sure we don't try and
  query a non-existant pipeline. This could happen if e.g. state is totally
  cleared at the start of the frame.
This commit is contained in:
baldurk
2014-11-30 23:07:36 +00:00
parent 5ae4b0d649
commit 6498424eed
+1 -1
View File
@@ -142,7 +142,7 @@ void GLRenderState::FetchState()
for(size_t s=0; s < ARRAY_COUNT(shs); s++)
{
GLuint prog = Program;
if(prog == 0) m_Real->glGetProgramPipelineiv(Pipeline, shs[s], (GLint *)&prog);
if(prog == 0 && Pipeline != 0) m_Real->glGetProgramPipelineiv(Pipeline, shs[s], (GLint *)&prog);
if(prog == 0) continue;