Fix egl surface crash 93/143393/4
authorHeeyong Song <heeyong.song@samsung.com>
Wed, 9 Aug 2017 12:53:29 +0000 (21:53 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Mon, 14 Aug 2017 02:28:35 +0000 (02:28 +0000)
Change-Id: I6fea3d23d30396a96bdc0f55ffeca122455da1bb

adaptors/base/render-helper.cpp
adaptors/ecore/wayland/render-surface-ecore-wl.cpp

index 9ef0ee9745690ec199fdbe7b7b76c72a8743b1ea..c77d2c9ee3781514157b7acd1700ddfcc37998c5 100644 (file)
@@ -79,9 +79,6 @@ void RenderHelper::Stop()
   {
     // Tell surface we have stopped rendering
     mSurface->StopRender();
-
-    // The surface will be destroyed soon; this pointer will become invalid
-    mSurface = NULL;
   }
 }
 
@@ -140,6 +137,8 @@ void RenderHelper::ShutdownEgl()
   {
     // give a chance to destroy the OpenGL surface that created externally
     mSurface->DestroyEglSurface( *mEGL );
+
+    mSurface = NULL;
   }
 
   // delete the GL context / egl surface
index 02a8eabc8b89b1e6feb0505e8a12554880596d83..2db6f236bd1aabe00cad6c909fe6841ac388bd63 100644 (file)
@@ -83,6 +83,10 @@ void EcoreWlRenderSurface::Init( Any surface )
 
 EcoreWlRenderSurface::~EcoreWlRenderSurface()
 {
+  if( mOwnSurface )
+  {
+    ecore_wl_shutdown();
+  }
 }
 
 void EcoreWlRenderSurface::SetRenderNotification(TriggerEventInterface* renderNotification)