diff options
-rw-r--r-- | src/egl/main/egldisplay.c | 5 |
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); } |