File U_intel-Prevent-crash-with-X-configure.patch of Package xf86-video-intel.5262

From: Chris Wilson <chris@chris-wilson.co.uk>
Date: Sat May 16 22:05:05 2015 +0100
Subject: [PATCH]intel: Prevent crash with X -configure
Patch-mainline: Upstream
Git-repo: git://anongit.freedesktop.org/git/xorg/driver/xf86-video-intel
Git-commit: aa44ba990a4c49fcfc5ed7dbf9968e3c622ffa0a
References: boo#985467
Signed-off-by: Egbert Eich <eich@suse.com>

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>
---
 src/intel_module.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/intel_module.c b/src/intel_module.c
index 2a3b016..689c0dd 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;
openSUSE Build Service is sponsored by