diff --git a/hw/pci/pci.c b/hw/pci/pci.c index e74143ccc36c1b669a08468ea10c54a562146de6..a26d82d945e1c70d379c7f16662ab3c1123e171a 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -249,6 +249,9 @@ static void pci_change_irq_level(PCIDevice *pci_dev, int irq_num, int change) PCIBus *bus; for (;;) { bus = pci_get_bus(pci_dev); + if (!bus) { + return; + } irq_num = bus->map_irq(pci_dev, irq_num); if (bus->set_irq) break;