summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qgl.cpp4
-rw-r--r--src/opengl/qgl_p.h1
2 files changed, 3 insertions, 2 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 10ba8ac2ee..d2c017fcac 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -2126,7 +2126,7 @@ QGLContext::QGLContext(const QGLFormat &format)
d->init(0, format);
}
-void qDeleteQGLContext(void *handle)
+static void qDeleteQGLContext(void *handle)
{
QGLContext *context = static_cast<QGLContext *>(handle);
delete context;
@@ -3475,7 +3475,7 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
d->valid = d->guiGlContext->create();
if (d->valid)
- d->guiGlContext->setQGLContextHandle(this, qDeleteQGLContext);
+ d->guiGlContext->setQGLContextHandle(this, 0);
d->glFormat = QGLFormat::fromSurfaceFormat(d->guiGlContext->format());
d->setupSharing();
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index 6dd939c2de..fb71e60ba9 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -242,6 +242,7 @@ public:
void swapRegion(const QRegion &region);
QOpenGLContext *guiGlContext;
+ // true if QGLContext owns the QOpenGLContext (for who deletes who)
bool ownContext;
void setupSharing();