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) {