From dbb866ab33862defc2749134805bafebf323fd11 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Mon, 25 Jan 2010 11:39:44 +0800 Subject: egl: Make resource void pointer in _eglCheckResource. This emphasizes the fact that the resource to be checked could really be invalid and have an unknown type. --- src/egl/main/egldisplay.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/egl/main/egldisplay.c') diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c index c978adb47f..74c655df41 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; } -- cgit v1.2.3