From 29cd7db616fcc1a6dd8697e48fefe8e4d44cf1a4 Mon Sep 17 00:00:00 2001 From: Fabian Bumberger Date: Sat, 1 Feb 2014 11:34:25 +0100 Subject: [PATCH] [QNX] Fix crash when creating eglSurface Change-Id: I9cf9d56003a5f237dcf00b621fddf74e8d0ca190 Reviewed-by: Rafael Roquetto --- src/plugins/platforms/qnx/qqnxeglwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/qnx/qqnxeglwindow.cpp b/src/plugins/platforms/qnx/qqnxeglwindow.cpp index 1aad25a418..5892252a5b 100644 --- a/src/plugins/platforms/qnx/qqnxeglwindow.cpp +++ b/src/plugins/platforms/qnx/qqnxeglwindow.cpp @@ -134,6 +134,8 @@ void QQnxEglWindow::swapEGLBuffers() EGLSurface QQnxEglWindow::getSurface() { if (m_newSurfaceRequested.testAndSetOrdered(true, false)) { + const QMutexLocker locker(&m_mutex); //Set geomety must not reset the requestedBufferSize till + //the surface is created if (m_eglSurface != EGL_NO_SURFACE) { platformOpenGLContext()->doneCurrent(); destroyEGLSurface(); @@ -165,7 +167,6 @@ void QQnxEglWindow::setGeometry(const QRect &rect) QSize QQnxEglWindow::requestedBufferSize() const { - const QMutexLocker locker(&m_mutex); return m_requestedBufferSize; } @@ -213,7 +214,6 @@ int QQnxEglWindow::pixelFormat() const void QQnxEglWindow::resetBuffers() { - const QMutexLocker locker(&m_mutex); m_requestedBufferSize = QSize(); }