From cfa53c5097cc3965c33e0d3287b2bc285a7ee54b Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 23 Jun 2024 21:39:02 +0200 Subject: [PATCH] Fixed a GCC compiler warning --- es-core/src/renderers/ShaderOpenGL.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) {