diff options
author | Fabian Bumberger <fbumberger@rim.com> | 2014-02-01 12:41:27 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-02 14:40:44 +0100 |
commit | c1c5aca6f1cafc967ee063240b48c361dfab272d (patch) | |
tree | a37945182cab511f48b12f260d4bc5449cd8a464 /src/plugins/platforms/qnx/qqnxglcontext.cpp | |
parent | 74d84f32daadbb5e8998bc13bdbb5b06642b0a56 (diff) |
[QNX] Handle the case when an egl surface can not be created
If an egl surface can not be created (e.g. when out of memory) the
application should not crash. In this case we will not be able to make
the egl surface current and have to return false in the makeCurrent call
in QQnxGlContext.
Change-Id: If9b5a82a0f64dc0a42bee687d351bea43fb05d51
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxglcontext.cpp')
-rw-r--r-- | src/plugins/platforms/qnx/qqnxglcontext.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/qnx/qqnxglcontext.cpp b/src/plugins/platforms/qnx/qqnxglcontext.cpp index 3e6ee201f6..3a365be408 100644 --- a/src/plugins/platforms/qnx/qqnxglcontext.cpp +++ b/src/plugins/platforms/qnx/qqnxglcontext.cpp @@ -227,7 +227,8 @@ bool QQnxGLContext::makeCurrent(QPlatformSurface *surface) eglResult = eglMakeCurrent(ms_eglDisplay, m_currentEglSurface, m_currentEglSurface, m_eglContext); if (eglResult != EGL_TRUE) { checkEGLError("eglMakeCurrent"); - qFatal("QQNX: failed to set current EGL context, err=%d", eglGetError()); + qWarning("QQNX: failed to set current EGL context, err=%d", eglGetError()); + return false; } return (eglResult == EGL_TRUE); } |