Fixed potential use of uninitialized variable in qgl.cpp

If glGetBooleanv fails this variable is left uninitialized.

Task-number: QTBUG-26952
Change-Id: Idb42833f2907bb66fd87c5cdb39753fca04e7438
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
bb10
Samuel Rødal 2012-09-19 17:01:01 +02:00 committed by The Qt Project
parent d626bea2c7
commit 727c55c094
1 changed files with 1 additions and 1 deletions

View File

@ -4851,7 +4851,7 @@ QGLExtensions::Extensions QGLExtensions::currentContextExtensions()
glExtensions |= BGRATextureFormat;
{
GLboolean srgbCapableFramebuffers;
GLboolean srgbCapableFramebuffers = false;
glGetBooleanv(GL_FRAMEBUFFER_SRGB_CAPABLE_EXT, &srgbCapableFramebuffers);
if (srgbCapableFramebuffers)
glExtensions |= SRGBFrameBuffer;