summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglshaderprogram.cpp
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <[email protected]>2011-11-19 20:57:14 +0100
committerQt by Nokia <[email protected]>2011-12-01 10:51:10 +0100
commitf1a67c65312e62c30698c07ab382db64998b8d56 (patch)
tree3a1f351ccac4cacffcb0e1876d17e560651f2bfb /src/opengl/qglshaderprogram.cpp
parent89aee9ecde7ca28b5ed93514c07c41ed110849cc (diff)
opengl: Do not crash when programGuard is a nullptr
The rest of the code is checking programGuard for nullptr, do it here as well to prevent a segmentation fault. Change-Id: I38a03f74d493b8f731157be1739707b39904f7ba Reviewed-by: Samuel Rødal <[email protected]>
Diffstat (limited to 'src/opengl/qglshaderprogram.cpp')
-rw-r--r--src/opengl/qglshaderprogram.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp
index 0163d60f0c5..af093bc9b4d 100644
--- a/src/opengl/qglshaderprogram.cpp
+++ b/src/opengl/qglshaderprogram.cpp
@@ -980,7 +980,7 @@ void QGLShaderProgram::release()
{
#ifndef QT_NO_DEBUG
Q_D(QGLShaderProgram);
- if (d->programGuard->group() != QOpenGLContextGroup::currentContextGroup())
+ if (d->programGuard && d->programGuard->group() != QOpenGLContextGroup::currentContextGroup())
qWarning("QGLShaderProgram::release: program is not valid in the current context.");
#endif
#if defined(QT_OPENGL_ES_2)