From 78f00c4c02d1c7e09299f95cc3fb75082c62d6d5 Mon Sep 17 00:00:00 2001 From: Joogab Yun Date: Tue, 5 Sep 2017 17:27:54 +0900 Subject: [PATCH] Fixed crash issues do eglMakeCurrent before eglDestroySurface() Change-Id: Iff8abcca5bcc5ec56e4ce3f34afcd6092ee41c9e --- adaptors/common/gl/egl-implementation.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/adaptors/common/gl/egl-implementation.cpp b/adaptors/common/gl/egl-implementation.cpp index dd2a59e..b55470b 100644 --- a/adaptors/common/gl/egl-implementation.cpp +++ b/adaptors/common/gl/egl-implementation.cpp @@ -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) -- 2.7.4