summaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglcurrent.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/main/eglcurrent.c')
-rw-r--r--src/egl/main/eglcurrent.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/egl/main/eglcurrent.c b/src/egl/main/eglcurrent.c
index f92719cfbc6..4431f964f69 100644
--- a/src/egl/main/eglcurrent.c
+++ b/src/egl/main/eglcurrent.c
@@ -4,6 +4,7 @@
#include "eglcontext.h"
#include "egllog.h"
#include "eglmutex.h"
+#include "eglglobals.h"
/* This should be kept in sync with _eglInitThreadInfo() */
@@ -84,7 +85,7 @@ static INLINE EGLBoolean _eglInitTSD(void (*dtor)(_EGLThreadInfo *))
return EGL_FALSE;
}
_egl_FreeTSD = dtor;
- (void) _eglFiniTSD;
+ _eglAddAtExitCall(_eglFiniTSD);
_egl_TSDInitialized = EGL_TRUE;
}
@@ -118,7 +119,7 @@ static INLINE EGLBoolean _eglInitTSD(void (*dtor)(_EGLThreadInfo *))
{
if (!_egl_FreeTSD && dtor) {
_egl_FreeTSD = dtor;
- (void) _eglFiniTSD;
+ _eglAddAtExitCall(_eglFiniTSD);
}
return EGL_TRUE;
}