From 4a9dccc3f5ead9a7210025ff725873431ec42c0a Mon Sep 17 00:00:00 2001 From: Jason Barron Date: Mon, 3 Sep 2012 10:42:27 +0200 Subject: [PATCH] Avoid hanging if glGetIntegerv() fails. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit If 'count' is not initialized, it could be anything and if the call to glGetIntegerv() fails and leaves this value unchanged then the loop could go through any number of iterations. Change-Id: Ibdcfd018b70e265ef6aeab87a5df8c0530c653a7 Reviewed-by: Samuel Rødal --- src/quick/scenegraph/coreapi/qsgrenderer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/quick/scenegraph/coreapi/qsgrenderer.cpp b/src/quick/scenegraph/coreapi/qsgrenderer.cpp index c0c9084..28415cf 100644 --- a/src/quick/scenegraph/coreapi/qsgrenderer.cpp +++ b/src/quick/scenegraph/coreapi/qsgrenderer.cpp @@ -256,7 +256,7 @@ void QSGRenderer::renderScene(const QSGBindable &bindable) #ifndef QT_NO_DEBUG // Sanity check that attribute registers are disabled { - GLint count; + GLint count = 0; glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &count); GLint enabled; for (int i=0; i