diff options
Diffstat (limited to 'src/egl/main/egldisplay.c')
-rw-r--r-- | src/egl/main/egldisplay.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c index cc0f03e01ba..47dcc3e05a5 100644 --- a/src/egl/main/egldisplay.c +++ b/src/egl/main/egldisplay.c @@ -233,17 +233,16 @@ _eglCheckResource(void *res, _EGLResourceType type, _EGLDisplay *dpy) /** - * Link a resource to a display. + * Link a resource to its display. */ void -_eglLinkResource(_EGLResource *res, _EGLResourceType type, _EGLDisplay *dpy) +_eglLinkResource(_EGLResource *res, _EGLResourceType type) { - assert(!res->Display || res->Display == dpy); + assert(res->Display); - res->Display = dpy; res->IsLinked = EGL_TRUE; - res->Next = dpy->ResourceLists[type]; - dpy->ResourceLists[type] = res; + res->Next = res->Display->ResourceLists[type]; + res->Display->ResourceLists[type] = res; } |