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
parent
fe2ddd8ba4
commit
978cb5d3ce
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue