projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
egl: Check for null display in handle checking.
[mesa.git]
/
src
/
egl
/
main
/
egldisplay.h
diff --git
a/src/egl/main/egldisplay.h
b/src/egl/main/egldisplay.h
index 6394c9cedba4853ec8da569085bec6beea66bdbb..20651e51ffdbf57ce82c1aaabda158f27586b10c 100644
(file)
--- a/
src/egl/main/egldisplay.h
+++ b/
src/egl/main/egldisplay.h
@@
-125,14
+125,17
@@
_eglCheckSurfaceHandle(EGLSurface surf, _EGLDisplay *dpy);
/* Only do a quick check. This is NOT standard compliant. */
static INLINE EGLBoolean
/* Only do a quick check. This is NOT standard compliant. */
static INLINE EGLBoolean
-_eglCheckDisplayHandle(EGLDisplay dpy) { return EGL_TRUE; }
+_eglCheckDisplayHandle(EGLDisplay dpy)
+{
+ return ((_EGLDisplay *) dpy != NULL);
+}
static INLINE EGLBoolean
_eglCheckContextHandle(EGLContext ctx, _EGLDisplay *dpy)
{
_EGLContext *c = (_EGLContext *) ctx;
static INLINE EGLBoolean
_eglCheckContextHandle(EGLContext ctx, _EGLDisplay *dpy)
{
_EGLContext *c = (_EGLContext *) ctx;
- return (c && c->Display == dpy);
+ return (
dpy &&
c && c->Display == dpy);
}
}
@@
-140,7
+143,7
@@
static INLINE EGLBoolean
_eglCheckSurfaceHandle(EGLSurface surf, _EGLDisplay *dpy)
{
_EGLSurface *s = (_EGLSurface *) surf;
_eglCheckSurfaceHandle(EGLSurface surf, _EGLDisplay *dpy)
{
_EGLSurface *s = (_EGLSurface *) surf;
- return (s && s->Display == dpy);
+ return (
dpy &&
s && s->Display == dpy);
}
}