egl: Do not do any further ops when context creation fails
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>
Mon, 17 Aug 2015 10:52:53 +0000 (12:52 +0200)
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>
Tue, 18 Aug 2015 12:32:39 +0000 (12:32 +0000)
Change-Id: I54bf4a720e8d414d310ecdb88f08a9705023aef9
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
src/platformsupport/eglconvenience/qeglplatformcontext.cpp

index 6d9f9e4ae0e0ecd19de195d1af3c4b74f0b5d9c0..5bee29afef1909e40588214132cbab0f770e71f7 100644 (file)
@@ -240,7 +240,8 @@ void QEGLPlatformContext::adopt(const QVariant &nativeHandle, QPlatformOpenGLCon
 
 void QEGLPlatformContext::initialize()
 {
-    updateFormatFromGL();
+    if (m_eglContext != EGL_NO_CONTEXT)
+        updateFormatFromGL();
 }
 
 EGLSurface QEGLPlatformContext::createTemporaryOffscreenSurface()