diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2015-05-16 22:05:05 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2015-05-16 22:15:31 +0100 |
commit | aa44ba990a4c49fcfc5ed7dbf9968e3c622ffa0a (patch) | |
tree | 496aae1c1b9a1d8ecb412bcd878c4f5223f59bd5 /src/intel_module.c | |
parent | f696867c897f1f879c4c03e19690e8217db4d81e (diff) |
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>
Diffstat (limited to 'src/intel_module.c')
-rw-r--r-- | src/intel_module.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; |