Delete EGL* from releaseEGL() in riMiEgl.cpp EGL_MERGE
authorJose Thachil<jose.thachil@cell-telecom.com>
Wed, 19 May 2010 11:44:23 +0100
branchEGL_MERGE
changeset 74 0f98da52363f
parent 73 a935d7985d66
child 75 b3f964e007c8
Delete EGL* from releaseEGL() in riMiEgl.cpp
egl/eglrefimpl/src/session.cpp
egl/sfopenvg/riMiniEGL.cpp
--- a/egl/eglrefimpl/src/session.cpp	Wed May 19 10:29:09 2010 +0100
+++ b/egl/eglrefimpl/src/session.cpp	Wed May 19 11:44:23 2010 +0100
@@ -80,7 +80,6 @@
 
 CEglThreadSession::~CEglThreadSession()
 	{
-	delete iEgl;
 	CEglDriver::Close();
 	}
 
--- a/egl/sfopenvg/riMiniEGL.cpp	Wed May 19 10:29:09 2010 +0100
+++ b/egl/sfopenvg/riMiniEGL.cpp	Wed May 19 11:44:23 2010 +0100
@@ -430,8 +430,6 @@
 		return NULL;
 		}
 	return es->getEgl();
-
-	
 }
 static void releaseEGL()
 {
@@ -445,11 +443,14 @@
 		}
 	}
 	*/
-	EGL* pEgl = static_cast<EGL*>(Dll::Tls());
-	if (pEgl)
-		delete pEgl; 
+	CEglThreadSession* es = reinterpret_cast<CEglThreadSession*>(Dll::Tls());
+	if (es)
+		{
+		EGL* pEgl = es->getEgl();
+		if (pEgl)
+			delete pEgl;
+		}
 	Dll::SetTls(NULL);
-
 }
 
 /*-------------------------------------------------------------------*//*!