equal
deleted
inserted
replaced
188 { |
188 { |
189 SetError(EGL_BAD_ALLOC); |
189 SetError(EGL_BAD_ALLOC); |
190 return EGL_FALSE; |
190 return EGL_FALSE; |
191 } |
191 } |
192 |
192 |
193 RIEGLDisplay* Egldisplay = iEgl->getDisplay(aDisplay); |
193 RIEGLDisplay* eglDispaly = iEgl->getDisplay(aDisplay); |
|
194 if(eglDispaly) |
|
195 return EGL_TRUE; |
|
196 |
194 //create the current display |
197 //create the current display |
195 |
198 RIEGLDisplay* newDisplay = NULL; |
196 RIEGLDisplay* newDisplay = NULL; |
|
197 try |
199 try |
198 { |
200 { |
199 newDisplay = new RIEGLDisplay(aDisplay); //throws bad_alloc |
201 newDisplay = new RIEGLDisplay(aDisplay); //throws bad_alloc |
200 iEgl->addDisplay(newDisplay); //throws bad_alloc |
202 iEgl->addDisplay(newDisplay); //throws bad_alloc |
201 Egldisplay = newDisplay; |
203 eglDispaly = newDisplay; |
202 RI_ASSERT(Egldisplay); |
204 RI_ASSERT(eglDispaly); |
203 } |
205 } |
204 catch(std::bad_alloc) |
206 catch(std::bad_alloc) |
205 { |
207 { |
206 RI_DELETE(iEgl); |
208 RI_DELETE(iEgl); |
207 iEgl = NULL; |
209 iEgl = NULL; |