summaryrefslogtreecommitdiff
path: root/src/egl/main/egldisplay.c
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2010-01-25 11:39:44 +0800
committerChia-I Wu <olvaffe@gmail.com>2010-01-25 11:44:13 +0800
commitdbb866ab33862defc2749134805bafebf323fd11 (patch)
tree7f6c37e9371d6341838bbb7c3eed7b702fe784dd /src/egl/main/egldisplay.c
parent3f932a444021958d632e3e6334d7b168304dfd74 (diff)
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.
Diffstat (limited to 'src/egl/main/egldisplay.c')
-rw-r--r--src/egl/main/egldisplay.c7
1 files changed, 5 insertions, 2 deletions
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;
}