diff options
author | Trond Kjernåsen <trond@trolltech.com> | 2009-10-16 11:04:13 (GMT) |
---|---|---|
committer | Trond Kjernåsen <trond@trolltech.com> | 2009-10-16 11:05:08 (GMT) |
commit | 2849e21a59a93714defc023a09b185f93cf1e712 (patch) | |
tree | dba0f7efa0b6e84f6b80c4ba770856e117bb14bc /src/opengl/qglframebufferobject.cpp | |
parent | b5106b1b99a749653c58719c333411b9ce374b67 (diff) | |
download | Qt-2849e21a59a93714defc023a09b185f93cf1e712.zip Qt-2849e21a59a93714defc023a09b185f93cf1e712.tar.gz Qt-2849e21a59a93714defc023a09b185f93cf1e712.tar.bz2 |
Fixed a crash in the tst_qgl test.
QGLFramebuffer::isBound() would crash if it was called when there
wasn't a current context bound.
Reviewed-by: Kim
Diffstat (limited to 'src/opengl/qglframebufferobject.cpp')
-rw-r--r-- | src/opengl/qglframebufferobject.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp index 9674cfb..4fb8629 100644 --- a/src/opengl/qglframebufferobject.cpp +++ b/src/opengl/qglframebufferobject.cpp @@ -1204,7 +1204,8 @@ QGLFramebufferObject::Attachment QGLFramebufferObject::attachment() const bool QGLFramebufferObject::isBound() const { Q_D(const QGLFramebufferObject); - return QGLContext::currentContext()->d_ptr->current_fbo == d->fbo(); + const QGLContext *current = QGLContext::currentContext(); + return current ? current->d_ptr->current_fbo == d->fbo() : false; } /*! |