Fixed crash issues 14/147914/3
authorJoogab Yun <joogab.yun@samsung.com>
Tue, 5 Sep 2017 08:27:54 +0000 (17:27 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Wed, 6 Sep 2017 14:24:04 +0000 (23:24 +0900)
do eglMakeCurrent before eglDestroySurface()

Change-Id: Iff8abcca5bcc5ec56e4ce3f34afcd6092ee41c9e

adaptors/common/gl/egl-implementation.cpp

index dd2a59e..b55470b 100644 (file)
@@ -155,6 +155,8 @@ void EglImplementation::DestroySurface()
 {
   if(mIsOwnSurface && mCurrentEglSurface)
   {
+    // Make context null to prevent crash in driver side
+    MakeContextNull();
     eglDestroySurface( mEglDisplay, mCurrentEglSurface );
     mCurrentEglSurface = 0;
   }
@@ -221,9 +223,7 @@ void EglImplementation::TerminateGles()
 {
   if ( mGlesInitialized )
   {
-    // in latest Mali DDK (r2p3 ~ r3p0 in April, 2012),
-    // MakeContextNull should be called before eglDestroy surface
-    // to prevent crash in _mali_surface_destroy_callback
+    // Make context null to prevent crash in driver side
     MakeContextNull();
 
     if(mIsOwnSurface && mCurrentEglSurface)