Fix for uninitialized local variable

This patch initializes a local GLuint that gets
checked after an if() chain that assigns it but
does not match all cases.

Change-Id: I132c26fa944f11c7b77131906ff8143a7b57c10f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
bb10
Laszlo Agocs 2016-09-29 11:29:11 +02:00 committed by Paolo Angelelli
parent fe2ddd8ba4
commit 978cb5d3ce
1 changed files with 1 additions and 1 deletions

View File

@ -296,7 +296,7 @@ bool QOpenGLShaderPrivate::create()
QOpenGLContext *context = const_cast<QOpenGLContext *>(QOpenGLContext::currentContext());
if (!context)
return false;
GLuint shader;
GLuint shader = 0;
if (shaderType == QOpenGLShader::Vertex) {
shader = glfuncs->glCreateShader(GL_VERTEX_SHADER);
} else if (shaderType == QOpenGLShader::Geometry && supportsGeometryShaders) {