summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopengl.cpp
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2016-02-05 10:45:20 -0800
committerGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2016-02-17 04:57:21 +0000
commit9212727813e808de8c136e26b113f8ed0e704e94 (patch)
treea18f1c148c06f8f1ad2034b053aae9d20ea57fe8 /src/gui/opengl/qopengl.cpp
parenta3b8e355fc17783a5d4badfb9ad50247655000cd (diff)
QOpenGLExtensionMatcher: Fix possible use of unintialized memory
Some drivers don't support GL_NUM_EXTENSIONS, so we may be reading random bits from numExtensions. Change-Id: Ibe61fa6d7c379f3f1428458edd3e0ddba0eb04d7 Task-number: QTBUG-48943 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/gui/opengl/qopengl.cpp')
-rw-r--r--src/gui/opengl/qopengl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/opengl/qopengl.cpp b/src/gui/opengl/qopengl.cpp
index a77d6743ad..3dedd7d7be 100644
--- a/src/gui/opengl/qopengl.cpp
+++ b/src/gui/opengl/qopengl.cpp
@@ -79,7 +79,7 @@ QOpenGLExtensionMatcher::QOpenGLExtensionMatcher()
if (!glGetStringi)
return;
- GLint numExtensions;
+ GLint numExtensions = 0;
funcs->glGetIntegerv(GL_NUM_EXTENSIONS, &numExtensions);
for (int i = 0; i < numExtensions; ++i) {