From aa44ba990a4c49fcfc5ed7dbf9968e3c622ffa0a Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 16 May 2015 22:05:05 +0100 Subject: [PATCH] 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 --- src/intel_module.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/intel_module.c b/src/intel_module.c index 2a3b0166..689c0dda 100644 --- a/src/intel_module.c +++ b/src/intel_module.c @@ -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;