summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-06-04 12:21:27 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-06-04 12:21:27 +0100
commitabb8d893742f4ba9567330da9706adda4e636e75 (patch)
tree8a398fbc471d5837c5a1bd34c4b478a2694471d2
parent782cd6eafa9917a5bdb181d66b7f4c05392950ba (diff)
sna: Be paranoid and guard against xf86GetPciInfoForEntity
Reported-by: Zdenek Kabelac <zkabelac@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_driver.c2
1 files changed, 1 insertions, 1 deletions
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)