diff options
author | Iikka Eklund <iikka.eklund@digia.com> | 2014-04-02 07:36:48 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-02 07:36:48 +0200 |
commit | d6f58e5e17d58c640fc7779652008fda0d66f41d (patch) | |
tree | d50d27e260c9eaf4bc2bcb4480b8a069a3aed857 /src/gui/opengl/qopenglvertexarrayobject.cpp | |
parent | 83de197a57ff6c3e5bbad26bd871981285384fcb (diff) | |
parent | 0ab63b035a649dc1982c867cd37d466d249004b9 (diff) |
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Diffstat (limited to 'src/gui/opengl/qopenglvertexarrayobject.cpp')
-rw-r--r-- | src/gui/opengl/qopenglvertexarrayobject.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/opengl/qopenglvertexarrayobject.cpp b/src/gui/opengl/qopenglvertexarrayobject.cpp index b1fd4ffdfe..22ca35a8c3 100644 --- a/src/gui/opengl/qopenglvertexarrayobject.cpp +++ b/src/gui/opengl/qopenglvertexarrayobject.cpp @@ -149,8 +149,6 @@ bool QOpenGLVertexArrayObjectPrivate::create() } Q_Q(QOpenGLVertexArrayObject); - if (context) - QObject::disconnect(context, SIGNAL(aboutToBeDestroyed()), q, SLOT(_q_contextAboutToBeDestroyed())); QOpenGLContext *ctx = QOpenGLContext::currentContext(); if (!ctx) { @@ -202,6 +200,8 @@ void QOpenGLVertexArrayObjectPrivate::destroy() if (!vao) return; + Q_Q(QOpenGLVertexArrayObject); + switch (vaoFuncsType) { #ifndef QT_OPENGL_ES_2 case Core_3_2: @@ -220,6 +220,10 @@ void QOpenGLVertexArrayObjectPrivate::destroy() break; } + Q_ASSERT(context); + QObject::disconnect(context, SIGNAL(aboutToBeDestroyed()), q, SLOT(_q_contextAboutToBeDestroyed())); + context = 0; + vao = 0; } |