summaryrefslogtreecommitdiffstats
path: root/src/gui/egl/qegl.cpp
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2009-10-02 09:13:30 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2009-10-19 12:56:37 (GMT)
commite2296ba010100d007a081e0faac8066adbeb7137 (patch)
treec5425000cda1b560aa842f015d060537495a4491 /src/gui/egl/qegl.cpp
parent4d94420184fa109286a9e4233010d5d7539a35a4 (diff)
downloadQt-e2296ba010100d007a081e0faac8066adbeb7137.zip
Qt-e2296ba010100d007a081e0faac8066adbeb7137.tar.gz
Qt-e2296ba010100d007a081e0faac8066adbeb7137.tar.bz2
Stop QEglContext destroying contexts it doesn't own
Reviewed-By: Rhys Weatherley
Diffstat (limited to 'src/gui/egl/qegl.cpp')
-rw-r--r--src/gui/egl/qegl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp
index 840b9d6..39291d3 100644
--- a/src/gui/egl/qegl.cpp
+++ b/src/gui/egl/qegl.cpp
@@ -61,6 +61,7 @@ QEglContext::QEglContext()
, cfg(0)
, currentSurface(EGL_NO_SURFACE)
, current(false)
+ , ownsContext(true)
{
}
@@ -206,7 +207,7 @@ void QEglContext::destroySurface(EGLSurface surface)
// Destroy the context. Note: this does not destroy the surface.
void QEglContext::destroy()
{
- if (ctx != EGL_NO_CONTEXT)
+ if (ctx != EGL_NO_CONTEXT && ownsContext)
eglDestroyContext(dpy, ctx);
dpy = EGL_NO_DISPLAY;
ctx = EGL_NO_CONTEXT;