summaryrefslogtreecommitdiffstats
path: root/src/egl
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-06-20 14:28:59 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-06-20 14:28:59 -0600
commit677151ad71d7f0792fb79597e972e2cad2cfc7d4 (patch)
tree6b335d373a3790ad29b129ab526b6851643b1952 /src/egl
parenta9b46b9e4c79665febb21180150ba54731aa4bc9 (diff)
downloadexternal_mesa3d-677151ad71d7f0792fb79597e972e2cad2cfc7d4.zip
external_mesa3d-677151ad71d7f0792fb79597e972e2cad2cfc7d4.tar.gz
external_mesa3d-677151ad71d7f0792fb79597e972e2cad2cfc7d4.tar.bz2
egl: added null ptr check
Diffstat (limited to 'src/egl')
-rw-r--r--src/egl/main/egldisplay.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c
index 540efd4..47a2323 100644
--- a/src/egl/main/egldisplay.c
+++ b/src/egl/main/egldisplay.c
@@ -68,8 +68,9 @@ _EGLDisplay *
_eglLookupDisplay(EGLDisplay dpy)
{
EGLuint key = (EGLuint) dpy;
- _EGLDisplay *d = (_EGLDisplay *) _eglHashLookup(_eglGlobal.Displays, key);
- return d;
+ if (!_eglGlobal.Displays)
+ return NULL;
+ return (_EGLDisplay *) _eglHashLookup(_eglGlobal.Displays, key);
}