From 11a16e38df8022b41aae0d41a67e8b5542801d1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lind?= Date: Mon, 26 Jul 2010 08:15:22 +0200 Subject: fix QGLContext::reset in lighthouse --- src/opengl/qgl_qpa.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/opengl/qgl_qpa.cpp b/src/opengl/qgl_qpa.cpp index 0fc885c..917842b 100644 --- a/src/opengl/qgl_qpa.cpp +++ b/src/opengl/qgl_qpa.cpp @@ -87,8 +87,10 @@ void QGLContext::reset() doneCurrent(); if (d->platformContext) { - //dont delete. This will be done by the platform - d->platformContext = 0; + if (d->paintDevice && d->paintDevice->devType() == QInternal::Widget) { + QWidget *widget = static_cast(d->paintDevice); + widget->destroy(); + } } d->crWin = false; -- cgit v0.12