From 08a482e7a9d13db5d4e6fd974942f6699d7d49dc Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Fri, 10 Sep 2010 00:02:47 +0800 Subject: egl: Display may be NULL in _eglLookup*. This fixes several NULL dereferences. --- src/egl/main/eglconfig.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/egl/main/eglconfig.h') diff --git a/src/egl/main/eglconfig.h b/src/egl/main/eglconfig.h index ca63c40d3d..0ad58cf473 100644 --- a/src/egl/main/eglconfig.h +++ b/src/egl/main/eglconfig.h @@ -117,7 +117,7 @@ static INLINE _EGLConfig * _eglLookupConfig(EGLConfig config, _EGLDisplay *dpy) { _EGLConfig *conf = (_EGLConfig *) config; - if (!_eglCheckConfigHandle(config, dpy)) + if (!dpy || !_eglCheckConfigHandle(config, dpy)) conf = NULL; return conf; } -- cgit v1.2.3