From 722267e748eba81769e2bee7e90b9073ac506e17 Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Fri, 22 May 2020 15:48:44 +0900 Subject: [PATCH] Fix DestroyContext bug Change-Id: I46d2806e48c6e4d3d7c97d94832e5ffa5147cb87 --- dali/internal/graphics/gles/egl-implementation.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dali/internal/graphics/gles/egl-implementation.cpp b/dali/internal/graphics/gles/egl-implementation.cpp index c653ab6..38851f9 100755 --- a/dali/internal/graphics/gles/egl-implementation.cpp +++ b/dali/internal/graphics/gles/egl-implementation.cpp @@ -195,10 +195,11 @@ bool EglImplementation::CreateWindowContext( EGLContext& eglContext ) void EglImplementation::DestroyContext( EGLContext& eglContext ) { - DALI_ASSERT_ALWAYS( mEglContext && "no EGL context" ); - - eglDestroyContext( mEglDisplay, eglContext ); - eglContext = 0; + if( eglContext ) + { + eglDestroyContext( mEglDisplay, eglContext ); + eglContext = 0; + } } void EglImplementation::DestroySurface( EGLSurface& eglSurface ) -- 2.7.4