summaryrefslogtreecommitdiffstats
path: root/src/egl/main/egldisplay.c
diff options
context:
space:
mode:
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;