diff --git a/hw/pci/pci.c b/hw/pci/pci.c index de0fae10ab9c6ac37b78fa8df717223fc094c6c9..df5a2c329493204592bceca6ee63e4c39594baf3 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -253,6 +253,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;