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:
parent
782cd6eafa
commit
abb8d89374
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue