# HG changeset patch # User Jose Thachil # Date 1273739278 -3600 # Node ID 013f1c757b1e3549be8c6523dc5662d5ca7113b3 # Parent 0fb7b31791c3abe780e4f35e1bd62025365f028b Check if RIEGLDisplay is already created in CEglThreadSession::EglInitialize,then return EGL_TRUE diff -r 0fb7b31791c3 -r 013f1c757b1e egl/eglrefimpl/src/session.cpp --- a/egl/eglrefimpl/src/session.cpp Wed May 12 13:05:33 2010 +0100 +++ b/egl/eglrefimpl/src/session.cpp Thu May 13 09:27:58 2010 +0100 @@ -190,16 +190,18 @@ return EGL_FALSE; } - RIEGLDisplay* Egldisplay = iEgl->getDisplay(aDisplay); + RIEGLDisplay* eglDispaly = iEgl->getDisplay(aDisplay); + if(eglDispaly) + return EGL_TRUE; + //create the current display - - RIEGLDisplay* newDisplay = NULL; + RIEGLDisplay* newDisplay = NULL; try { newDisplay = new RIEGLDisplay(aDisplay); //throws bad_alloc iEgl->addDisplay(newDisplay); //throws bad_alloc - Egldisplay = newDisplay; - RI_ASSERT(Egldisplay); + eglDispaly = newDisplay; + RI_ASSERT(eglDispaly); } catch(std::bad_alloc) {