summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_egl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qgl_egl.cpp')
-rw-r--r--src/opengl/qgl_egl.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp
index 5ce1a45..6c93bea 100644
--- a/src/opengl/qgl_egl.cpp
+++ b/src/opengl/qgl_egl.cpp
@@ -142,10 +142,12 @@ void QGLContext::reset()
d->cleanup();
doneCurrent();
if (d->eglContext) {
+ if (d->eglSurface != EGL_NO_SURFACE)
+ eglDestroySurface(d->eglContext->display(), d->eglSurface);
delete d->eglContext;
- d->eglContext = 0;
}
- d->eglSurface = EGL_NO_SURFACE; // XXX - probably need to destroy surface
+ d->eglContext = 0;
+ d->eglSurface = EGL_NO_SURFACE;
d->crWin = false;
d->sharing = false;
d->valid = false;