src/opengl/qgl_egl.cpp
changeset 37 758a864f9613
parent 33 3e2da88830cd
--- a/src/opengl/qgl_egl.cpp	Fri Sep 17 08:34:18 2010 +0300
+++ b/src/opengl/qgl_egl.cpp	Mon Oct 04 01:19:32 2010 +0300
@@ -230,7 +230,7 @@
 void QGLContextPrivate::destroyEglSurfaceForDevice()
 {
     if (eglSurface != EGL_NO_SURFACE) {
-#ifdef Q_WS_X11
+#if defined(Q_WS_X11) || defined(Q_OS_SYMBIAN)
         // Make sure we don't call eglDestroySurface on a surface which
         // was created for a different winId. This applies only to QGLWidget
         // paint device, so make sure this is the one we're operating on
@@ -240,6 +240,7 @@
             if (QGLWidget *wgl = qobject_cast<QGLWidget *>(w)) {
                 if (wgl->d_func()->eglSurfaceWindowId != wgl->winId()) {
                     qWarning("WARNING: Potential EGL surface leak! Not destroying surface.");
+                    eglSurface = EGL_NO_SURFACE;
                     return;
                 }
             }