sna: Be paranoid and guard against xf86GetPciInfoForEntity

Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-06-04 12:21:27 +01:00
parent 782cd6eafa
commit abb8d89374
1 changed files with 1 additions and 1 deletions

View File

@ -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)