isapc: Fix irq routing

Only send irqs to ioapic in case we have one.
Fixes qemu segfault.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Gerd Hoffmann 2009-09-10 11:43:23 +02:00 committed by malc
parent c4a735f9cb
commit 2c8d934020
1 changed files with 2 additions and 1 deletions

View File

@ -100,7 +100,8 @@ static void isa_irq_handler(void *opaque, int n, int level)
if (n < 16) {
qemu_set_irq(isa->i8259[n], level);
}
qemu_set_irq(isa->ioapic[n], level);
if (isa->ioapic)
qemu_set_irq(isa->ioapic[n], level);
};
static void ioport80_write(void *opaque, uint32_t addr, uint32_t data)