Fix DestroyContext bug 38/234138/1
authorHeeyong Song <heeyong.song@samsung.com>
Fri, 22 May 2020 06:48:44 +0000 (15:48 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Fri, 22 May 2020 06:49:02 +0000 (15:49 +0900)
Change-Id: I46d2806e48c6e4d3d7c97d94832e5ffa5147cb87

dali/internal/graphics/gles/egl-implementation.cpp

index c653ab6..38851f9 100755 (executable)
@@ -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 )