glx: Properly handle cases where screen creation fails
authorChuck Atkins <chuck.atkins@kitware.com>
Thu, 22 Feb 2018 14:19:37 +0000 (09:19 -0500)
committerChuck Atkins <chuck.atkins@kitware.com>
Thu, 22 Feb 2018 15:20:32 +0000 (10:20 -0500)
commit540e49e1054d60f5f3809b6efc828ac4cac8c708
treef5d2bc23fe747bf02b295e9f2939de2d2d64d241
parent7668b594e61e78ea4419936293fd5c6d756e0400
glx: Properly handle cases where screen creation fails

This fixes a segfault exposed by a29d63ecf7 which occurs when swr is
used on an unsupported architecture.

v2: re-work to place logic in xmesa_init_display

Signed-off-by: Chuck Atkins <chuck.atkins@kitware.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
Cc: George Kyriazis <george.kyriazis@intel.com>
Cc: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/state_trackers/glx/xlib/glx_api.c
src/gallium/state_trackers/glx/xlib/xm_api.c
src/gallium/state_trackers/glx/xlib/xm_api.h