diff -r ef0373b55136 -r 758a864f9613 src/opengl/qgl_egl.cpp --- 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(w)) { if (wgl->d_func()->eglSurfaceWindowId != wgl->winId()) { qWarning("WARNING: Potential EGL surface leak! Not destroying surface."); + eglSurface = EGL_NO_SURFACE; return; } }