summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorTrond Kjernåsen <trond.kjernasen@nokia.com>2010-06-11 10:25:29 (GMT)
committerTrond Kjernåsen <trond.kjernasen@nokia.com>2010-06-11 10:25:29 (GMT)
commit3ff9474b8e3812f629869bc349ffb0a7f70c93a4 (patch)
tree0ac894fb37a7469d6ce1b23606eee75744ef213c /src/opengl
parent045732d43f38dadc6019e3ca53e547e4bcb31190 (diff)
downloadQt-3ff9474b8e3812f629869bc349ffb0a7f70c93a4.zip
Qt-3ff9474b8e3812f629869bc349ffb0a7f70c93a4.tar.gz
Qt-3ff9474b8e3812f629869bc349ffb0a7f70c93a4.tar.bz2
Fix another potential strstr() crash for EGL based GL apps.
Task-number: releated to QT-3498 Reviewed-by: Samuel
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qgl_egl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp
index 4a89b26..0a19531 100644
--- a/src/opengl/qgl_egl.cpp
+++ b/src/opengl/qgl_egl.cpp
@@ -200,7 +200,8 @@ void QGLContext::makeCurrent()
// bug which prevents glCopyTexSubImage2D() to work with a POT
// or GL_ALPHA texture bound to an FBO. The only way to
// identify that driver is to check the EGL version number for it.
- if (strstr(eglQueryString(d->eglContext->display(), EGL_VERSION), "1.3"))
+ const char *egl_version = eglQueryString(d->eglContext->display(), EGL_VERSION);
+ if (egl_version && strstr(egl_version, "1.3"))
d->workaround_brokenFBOReadBack = true;
}
}