diff options
-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; } /*! |