egl/x11: bail out if we cannot fetch the xcb connection
authorEmil Velikov <emil.l.velikov@gmail.com>
Wed, 29 Jul 2015 16:19:02 +0000 (17:19 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 7 Aug 2015 18:13:35 +0000 (19:13 +0100)
commit60e9c35b3a0384860ffcb01d902a69ee13254eb9
tree4d307d017e131f2d4f80050dd66d728594b090c1
parent75ce7919d6496981013a21a7055c668e47e7bed2
egl/x11: bail out if we cannot fetch the xcb connection

The documentation of xcb_connection_has_error() does not mention
what will happen, if NULL is fed to the function.

Upon closer look (props to Matt), it seems that we'll crash as the
implementation dereferences conn.

This will also allow us to remove the dri2_dpy->conn checking with the
next commit.

v2: Reword commit message as per Matt's findings.

Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
src/egl/drivers/dri2/platform_x11.c