summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorTrond Kjernåsen <trond.kjernasen@nokia.com>2010-06-11 08:52:43 (GMT)
committerTrond Kjernåsen <trond.kjernasen@nokia.com>2010-06-11 08:59:33 (GMT)
commit045732d43f38dadc6019e3ca53e547e4bcb31190 (patch)
tree9bfd39434d36dd228b47cd700304da8eb93608c8 /src/opengl
parentfbb3aca27682bfe81c17866f518eae23b3158aef (diff)
downloadQt-045732d43f38dadc6019e3ca53e547e4bcb31190.zip
Qt-045732d43f38dadc6019e3ca53e547e4bcb31190.tar.gz
Qt-045732d43f38dadc6019e3ca53e547e4bcb31190.tar.bz2
Fixed an on-exit application crash for GL apps using EGL.
Task-number: QT-3498 Reviewed-by: Samuel
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qgl_egl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp
index 44e8ae9..4a89b26 100644
--- a/src/opengl/qgl_egl.cpp
+++ b/src/opengl/qgl_egl.cpp
@@ -190,7 +190,7 @@ void QGLContext::makeCurrent()
if (!d->workaroundsCached) {
d->workaroundsCached = true;
const char *renderer = reinterpret_cast<const char *>(glGetString(GL_RENDERER));
- if (strstr(renderer, "SGX") || strstr(renderer, "MBX")) {
+ if (renderer && (strstr(renderer, "SGX") || strstr(renderer, "MBX"))) {
// PowerVR MBX/SGX chips needs to clear all buffers when starting to render
// a new frame, otherwise there will be a performance penalty to pay for
// each frame.