summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
diff options
context:
space:
mode:
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/GLContextAndroid.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/src/GLContextAndroid.cpp b/Graphics/GraphicsEngineOpenGL/src/GLContextAndroid.cpp
index 0dce35d3..47353a04 100644
--- a/Graphics/GraphicsEngineOpenGL/src/GLContextAndroid.cpp
+++ b/Graphics/GraphicsEngineOpenGL/src/GLContextAndroid.cpp
@@ -294,7 +294,14 @@ namespace Diligent
if( err == EGL_BAD_SURFACE )
{
LOG_INFO_MESSAGE("EGL surface has been lost. Attempting to recreate");
- InitEGLSurface();
+ try
+ {
+ InitEGLSurface();
+ }
+ catch(std::runtime_error &)
+ {
+ LOG_ERROR_MESSAGE("Failed to recreate EGL surface");
+ }
//return EGL_SUCCESS; //Still consider glContext is valid
}
else if( err == EGL_CONTEXT_LOST || err == EGL_BAD_CONTEXT )