egl: avoid dereferencing a null display
Fixes: ddb99127a6
("egl/x11: Honor the EGL_PLATFORM_X11_SCREEN_EXT attribute")
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
@@ -505,8 +505,10 @@ _eglGetX11Display(Display *native_display,
|
|||||||
_EGLDisplay *display = _eglFindDisplay(_EGL_PLATFORM_X11,
|
_EGLDisplay *display = _eglFindDisplay(_EGL_PLATFORM_X11,
|
||||||
native_display);
|
native_display);
|
||||||
|
|
||||||
if (!display)
|
if (!display) {
|
||||||
_eglError(EGL_BAD_ALLOC, "eglGetPlatformDisplay");
|
_eglError(EGL_BAD_ALLOC, "eglGetPlatformDisplay");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (!_eglParseX11DisplayAttribList(display, attrib_list)) {
|
if (!_eglParseX11DisplayAttribList(display, attrib_list)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Reference in New Issue
Block a user