From abb8d893742f4ba9567330da9706adda4e636e75 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 4 Jun 2012 12:21:27 +0100 Subject: [PATCH] sna: Be paranoid and guard against xf86GetPciInfoForEntity Reported-by: Zdenek Kabelac Signed-off-by: Chris Wilson --- src/sna/sna_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c index a1581f36..59ee57fe 100644 --- a/src/sna/sna_driver.c +++ b/src/sna/sna_driver.c @@ -426,7 +426,7 @@ static Bool sna_pre_init(ScrnInfoPtr scrn, int flags) return FALSE; pEnt = xf86GetEntityInfo(scrn->entityList[0]); - if (pEnt->location.type != BUS_PCI) + if (pEnt == NULL || pEnt->location.type != BUS_PCI) return FALSE; if (flags & PROBE_DETECT)