diff options
Diffstat (limited to 'hw/ne2000.c')
-rw-r--r-- | hw/ne2000.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/ne2000.c b/hw/ne2000.c index 99612e2..613ac41 100644 --- a/hw/ne2000.c +++ b/hw/ne2000.c @@ -810,6 +810,9 @@ PCIDevice *pci_ne2000_init(PCIBus *bus, NICInfo *nd, int devfn) "NE2000", sizeof(PCINE2000State), devfn, NULL, NULL); + if (!d) + return NULL; + pci_conf = d->dev.config; pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_REALTEK); pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_REALTEK_8029); |