avoid segfault in pci_device_vgaarb_fini() when called without
initializing the library first. (This happens when invalid options are passed to X for instance). ok kettenis@
This commit is contained in:
parent
9e6242225e
commit
ae10e3711f
@ -560,9 +560,12 @@ pci_device_vgaarb_init(void)
|
||||
void
|
||||
pci_device_vgaarb_fini(void)
|
||||
{
|
||||
struct pci_device *dev = pci_sys->vga_target;
|
||||
struct pci_device *dev;
|
||||
struct pci_vga pv;
|
||||
|
||||
if (pci_sys == NULL)
|
||||
return;
|
||||
dev = pci_sys->vga_target;
|
||||
if (dev == NULL)
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user