summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/eglfs
diff options
context:
space:
mode:
authorJesus Fernandez <jesus.fernandez@qt.io>2017-04-27 18:16:44 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2017-04-28 20:03:06 +0000
commitdc8933e0aa12a75fd9406551650bcfd3f13cad23 (patch)
tree21046eab6bde086926365736737a664d96ca1906 /src/plugins/platforms/eglfs
parent5995238f295d67baca2cec95d69687a7fc6d6d71 (diff)
Initialize vao variable
If vaoHelper is not valid the vao variable was being initializated with a random value. Change-Id: I44962841baeb1a1cff3124d6126e19c791feaea3 Coverity-Id: 171484 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/plugins/platforms/eglfs')
-rw-r--r--src/plugins/platforms/eglfs/api/qeglfscursor.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/eglfs/api/qeglfscursor.cpp b/src/plugins/platforms/eglfs/api/qeglfscursor.cpp
index 19a0e03212..f46206cab5 100644
--- a/src/plugins/platforms/eglfs/api/qeglfscursor.cpp
+++ b/src/plugins/platforms/eglfs/api/qeglfscursor.cpp
@@ -410,6 +410,8 @@ struct StateSaver
f->glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &arrayBuf);
if (vaoHelper->isValid())
f->glGetIntegerv(GL_VERTEX_ARRAY_BINDING, &vao);
+ else
+ vao = 0;
for (int i = 0; i < 2; ++i) {
f->glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_ENABLED, &va[i].enabled);
f->glGetVertexAttribiv(i, GL_VERTEX_ATTRIB_ARRAY_SIZE, &va[i].size);