Fix DestroyContext bug
[platform/core/uifw/dali-adaptor.git] / 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 )