From: Jason Barron Date: Mon, 3 Sep 2012 08:42:27 +0000 (+0200) Subject: Avoid hanging if glGetIntegerv() fails. X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=4a9dccc3f5ead9a7210025ff725873431ec42c0a;p=konrad%2Fqtdeclarative.git Avoid hanging if glGetIntegerv() fails. 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 --- 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