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 9ef0ee9..c77d2c9 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 02a8eab..2db6f23 100644 (file)
@@ -83,6 +83,10 @@ void EcoreWlRenderSurface::Init( Any surface )
 
 EcoreWlRenderSurface::~EcoreWlRenderSurface()
 {
+  if( mOwnSurface )
+  {
+    ecore_wl_shutdown();
+  }
 }
 
 void EcoreWlRenderSurface::SetRenderNotification(TriggerEventInterface* renderNotification)