intel: Prevent crash with X -configure

When run with -configure, xf86configptr is NULL, so be careful and do
not dereference it.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2015-05-16 22:05:05 +01:00
parent f696867c89
commit aa44ba990a
1 changed files with 3 additions and 0 deletions

View File

@ -514,6 +514,9 @@ static enum accel_method { NOACCEL, SNA, UXA } get_accel_method(void)
if (hosted())
return SNA;
if (xf86configptr == NULL) /* X -configure */
return SNA;
dev = _xf86findDriver("intel", xf86configptr->conf_device_lst);
if (dev && dev->dev_option_lst) {
const char *s;