diff options
author | Jani Hautakangas <jani.hautakangas@nokia.com> | 2011-11-08 10:04:45 +0200 |
---|---|---|
committer | Jani Hautakangas <jani.hautakangas@nokia.com> | 2011-11-08 10:36:39 +0200 |
commit | 96e484c95629afd1f550449296f82c0561e64d26 (patch) | |
tree | 61822510697ebeddc5ed56f1fe5c68ea708621d4 /src/opengl/gl2paintengineex | |
parent | f92483c3922763a5f5d1500f4892be8b214fe299 (diff) | |
download | qt4-tools-96e484c95629afd1f550449296f82c0561e64d26.tar.gz |
Fix to QtOpenGL crash on Symbian
Under some rare circumstances EGL context creation
fails on Symbian leading to application crash. However,
Qt is able to recover from this if context pointers
are guarded by null pointer checks in QtOpenGL.
Task-number: QT-5334
Reviewed-by: Samuel Rødal
Diffstat (limited to 'src/opengl/gl2paintengineex')
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index f5fe73926d..2db5b79005 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -2108,6 +2108,10 @@ bool QGL2PaintEngineEx::begin(QPaintDevice *pdev) return false; d->ctx = d->device->context(); +#ifdef Q_OS_SYMBIAN + if (!d->ctx) + return false; +#endif d->ctx->d_ptr->active_engine = this; const QSize sz = d->device->size(); |