diff options
author | Jason Barron <jason.barron@nokia.com> | 2012-09-03 10:42:27 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-09-21 10:55:38 +0200 |
commit | 4a9dccc3f5ead9a7210025ff725873431ec42c0a (patch) | |
tree | f74e236cdf998eaed4b1e29a6cd0f3f310e2c9b4 /src | |
parent | 5c88efc06d152ac675b4369d854699b137631fa0 (diff) |
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 <samuel.rodal@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgrenderer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgrenderer.cpp b/src/quick/scenegraph/coreapi/qsgrenderer.cpp index c0c908497d..28415cffce 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<count; ++i) { |