diff --git a/es-core/src/renderers/ShaderOpenGL.cpp b/es-core/src/renderers/ShaderOpenGL.cpp index e2f7df5d4..22e7584ed 100644 --- a/es-core/src/renderers/ShaderOpenGL.cpp +++ b/es-core/src/renderers/ShaderOpenGL.cpp @@ -273,11 +273,11 @@ void ShaderOpenGL::printShaderInfoLog(GLuint shaderID, GLenum shaderType, bool e int maxLength; glGetShaderiv(shaderID, GL_INFO_LOG_LENGTH, &maxLength); - std::vector infoLog(maxLength); - if (infoLog.size() == 0) + if (maxLength == 0) return; + std::vector infoLog(maxLength); glGetShaderInfoLog(shaderID, maxLength, &logLength, &infoLog.front()); if (logLength > 0) {