From 1d13522190346b20bf079ae48ce919c9e15a2c7a Mon Sep 17 00:00:00 2001 From: Jani Hautakangas Date: Mon, 23 Aug 2010 12:54:49 +0300 Subject: On Symbian QGLWidget::glDraw() must do nothing if widget isn't visible. Otherwise application crashes because rendering to invisible window surface will panic eventually. Reviewed-by: Trond --- src/opengl/qgl.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 51187cf..9e69816 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -4445,6 +4445,11 @@ void QGLWidget::glDraw() Q_D(QGLWidget); if (!isValid()) return; +#ifdef Q_OS_SYMBIAN + // Crashes on Symbian if trying to render to invisible surfaces + if (!isVisible() && d->glcx->device()->devType() == QInternal::Widget) + return; +#endif makeCurrent(); #ifndef QT_OPENGL_ES if (d->glcx->deviceIsPixmap()) -- cgit v0.12