egl/x11: don't crash if dri2_dpy->conn is NULL
authorEmil Velikov <emil.velikov@collabora.com>
Wed, 24 Aug 2016 22:57:16 +0000 (23:57 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 14 Oct 2016 11:42:37 +0000 (12:42 +0100)
commitb10c05d4ffaf67786b48b978871e1015b3840653
treef7b79b8b738021ee4aa8849dd37b55323487de70
parentf871946594129500a67c05a6d9fe99db54b4bb64
egl/x11: don't crash if dri2_dpy->conn is NULL

The dri3 version of commits 60e9c35b3a0 and 6de9a03bed4.

While using xcb_connect() guarantees that we always get a non NULL
return value, XGetXCBConnection() does/can not.

CC: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
src/egl/drivers/dri2/platform_x11.c