From 9856f795a7105eb12c0ec3de7576190f227891e1 Mon Sep 17 00:00:00 2001 From: Egor Date: Sun, 11 Feb 2018 11:10:56 -0800 Subject: One more fix for Android context --- Graphics/GraphicsEngineOpenGL/src/GLContextAndroid.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Graphics/GraphicsEngineOpenGL') 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 ) -- cgit v1.2.3