aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl/main/egldisplay.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/main/egldisplay.c')
-rw-r--r--src/egl/main/egldisplay.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c
index f6db03ab50c..907a60747d0 100644
--- a/src/egl/main/egldisplay.c
+++ b/src/egl/main/egldisplay.c
@@ -240,6 +240,7 @@ _EGLDisplay *
_eglFindDisplay(_EGLPlatformType plat, void *plat_dpy)
{
_EGLDisplay *dpy;
+ _EGLThreadInfo *thread = _eglGetCurrentThread();
if (plat == _EGL_INVALID_PLATFORM)
return NULL;
@@ -265,9 +266,13 @@ _eglFindDisplay(_EGLPlatformType plat, void *plat_dpy)
/* add to the display list */
dpy->Next = _eglGlobal.DisplayList;
_eglGlobal.DisplayList = dpy;
+ dpy->ThreadList = NULL;
}
}
+ thread->Next = dpy->ThreadList;
+ dpy->ThreadList = thread;
+
mtx_unlock(_eglGlobal.Mutex);
return dpy;