diff options
Diffstat (limited to 'src/egl/main/egldisplay.c')
-rw-r--r-- | src/egl/main/egldisplay.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c index c978adb47f5..74c655df411 100644 --- a/src/egl/main/egldisplay.c +++ b/src/egl/main/egldisplay.c @@ -214,12 +214,15 @@ _eglCheckDisplayHandle(EGLDisplay dpy) * own the resource. */ EGLBoolean -_eglCheckResource(_EGLResource *res, _EGLResourceType type, _EGLDisplay *dpy) +_eglCheckResource(void *res, _EGLResourceType type, _EGLDisplay *dpy) { _EGLResource *list = dpy->ResourceLists[type]; + if (!res) + return EGL_FALSE; + while (list) { - if (res == list) { + if (res == (void *) list) { assert(list->Display == dpy); break; } |