diff options
Diffstat (limited to 'examples/opengl/hellogl2/glwidget.cpp')
-rw-r--r-- | examples/opengl/hellogl2/glwidget.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/opengl/hellogl2/glwidget.cpp b/examples/opengl/hellogl2/glwidget.cpp index 9988902071..23736cd752 100644 --- a/examples/opengl/hellogl2/glwidget.cpp +++ b/examples/opengl/hellogl2/glwidget.cpp @@ -131,6 +131,7 @@ void GLWidget::cleanup() delete m_program; m_program = nullptr; doneCurrent(); + QObject::disconnect(context(), &QOpenGLContext::aboutToBeDestroyed, this, &GLWidget::cleanup); } static const char *vertexShaderSourceCore = |