Fix possible crash when task switching on Android

This commit is contained in:
Henrik Rydgård 2017-03-06 17:04:55 +01:00
parent 90e0079c98
commit 1496e2caa2

View File

@ -406,6 +406,10 @@ void FramebufferManagerGLES::DrawActiveTexture(float x, float y, float w, float
}
const GLSLProgram *program = glsl_get_program();
if (!program) {
ERROR_LOG(G3D, "Trying to draw without a program");
return;
}
glEnableVertexAttribArray(program->a_position);
glEnableVertexAttribArray(program->a_texcoord0);
if (gstate_c.Supports(GPU_SUPPORTS_VAO)) {