egl: Make resource void pointer in _eglCheckResource.
[mesa.git] / src / egl / main / eglcontext.h
index b81dc1ed8207554417625f6cca180a5c65994c3c..be00642d1349b3bbfb4805916d631f98d1a2d83a 100644 (file)
@@ -95,9 +95,8 @@ _eglUnlinkContext(_EGLContext *ctx)
 static INLINE _EGLContext *
 _eglLookupContext(EGLContext context, _EGLDisplay *dpy)
 {
-   _EGLResource *res = (_EGLResource *) context;
    _EGLContext *ctx = (_EGLContext *) context;
-   if (!res || !dpy || !_eglCheckResource(res, _EGL_RESOURCE_CONTEXT, dpy))
+   if (!dpy || !_eglCheckResource((void *) ctx, _EGL_RESOURCE_CONTEXT, dpy))
       ctx = NULL;
    return ctx;
 }