Fix potential crash if shader reflection is NULL

This commit is contained in:
Baldur Karlsson
2018-03-12 15:46:45 +00:00
parent 128381ce10
commit 4992e09918
+6
View File
@@ -1913,6 +1913,12 @@ void MakeShaderReflection(const GLHookSet &gl, GLenum shadType, GLuint sepProg,
void GetBindpointMapping(const GLHookSet &gl, GLuint curProg, int shadIdx, ShaderReflection *refl,
ShaderBindpointMapping &mapping)
{
if(!refl)
{
mapping = ShaderBindpointMapping();
return;
}
// in case of bugs, we readback into this array instead of
GLint dummyReadback[32];