Mark main window as not used if EGL window creation fails.
authorMika Isojärvi <misojarvi@google.com>
Wed, 11 Mar 2015 20:49:46 +0000 (13:49 -0700)
committerMika Isojärvi <misojarvi@google.com>
Wed, 11 Mar 2015 20:49:46 +0000 (13:49 -0700)
Set atomic flag indicating if main native window is used back to 0 if creation
of EGL window surface fails.

Change-Id: I782419ce2872c87084fe24f40ab7caa7728bb1c7

modules/egl/teglMultiThreadTests.cpp

index fe5dde2..19201c7 100644 (file)
@@ -1096,7 +1096,7 @@ void MultiThreadedObjectTest::createDestroyObjects (TestThread& thread, int coun
                                        const eglu::NativeWindowFactory*        windowFactory   = eglu::selectNativeWindowFactory(m_eglTestCtx.getNativeDisplayFactory(), m_testCtx.getCommandLine());
 
                                        if (!windowFactory)
-                                               TCU_THROW(NotSupportedError, "Windows nos supported");
+                                               TCU_THROW(NotSupportedError, "Windows not supported");
 
                                        if ((m_types & TYPE_SINGLE_WINDOW) != 0)
                                        {
@@ -1118,6 +1118,7 @@ void MultiThreadedObjectTest::createDestroyObjects (TestThread& thread, int coun
                                                                if (surface != EGL_NO_SURFACE)
                                                                        EGLU_CHECK_CALL(egl, destroySurface(m_display, surface));
                                                                delete window;
+                                                               m_hasWindow = 0;
                                                                throw;
                                                        }
                                                }