Skip to content

Commit 9856f79

Browse files
One more fix for Android context
1 parent 6d6f17c commit 9856f79

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Graphics/GraphicsEngineOpenGL/src/GLContextAndroid.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,14 @@ namespace Diligent
294294
if( err == EGL_BAD_SURFACE )
295295
{
296296
LOG_INFO_MESSAGE("EGL surface has been lost. Attempting to recreate");
297-
InitEGLSurface();
297+
try
298+
{
299+
InitEGLSurface();
300+
}
301+
catch(std::runtime_error &)
302+
{
303+
LOG_ERROR_MESSAGE("Failed to recreate EGL surface");
304+
}
298305
//return EGL_SUCCESS; //Still consider glContext is valid
299306
}
300307
else if( err == EGL_CONTEXT_LOST || err == EGL_BAD_CONTEXT )

0 commit comments

Comments
 (0)