aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl/main/egldisplay.c
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2017-05-07 23:44:12 +0100
committerEric Engestrom <[email protected]>2017-05-08 11:43:36 +0100
commitdc795f85a56ee95f16ef33c7cf6b373506c9b0d6 (patch)
treedf0bdd296111f2cc1e36c374b763e12b23486555 /src/egl/main/egldisplay.c
parent9c70537a52da2455c06c660ef40f20c69b08df16 (diff)
egl: avoid dereferencing a null display
Fixes: ddb99127a6f6c ("egl/x11: Honor the EGL_PLATFORM_X11_SCREEN_EXT attribute") Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/egl/main/egldisplay.c')
-rw-r--r--src/egl/main/egldisplay.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c
index b047a5de429..c4b0fd6aab1 100644
--- a/src/egl/main/egldisplay.c
+++ b/src/egl/main/egldisplay.c
@@ -505,8 +505,10 @@ _eglGetX11Display(Display *native_display,
_EGLDisplay *display = _eglFindDisplay(_EGL_PLATFORM_X11,
native_display);
- if (!display)
+ if (!display) {
_eglError(EGL_BAD_ALLOC, "eglGetPlatformDisplay");
+ return NULL;
+ }
if (!_eglParseX11DisplayAttribList(display, attrib_list)) {
return NULL;