From: Toni Wilen Date: Sat, 7 Jan 2023 12:39:18 +0000 (+0200) Subject: PCI non-existing board access crash fix X-Git-Tag: 41010~23 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=d2e81faf9ceecec8af92b5c92e9142d5ebd33f5d;p=francis%2Fwinuae.git PCI non-existing board access crash fix --- diff --git a/pci.cpp b/pci.cpp index 2e320e18..c9491a35 100644 --- a/pci.cpp +++ b/pci.cpp @@ -358,7 +358,7 @@ static struct pci_board_state *get_pci_board_state(struct pci_bridge *pcib, uaec if (io && addr2 < 0x400) { for (int i = 0; i < MAX_PCI_BOARDS; i++) { struct pci_board_state *pcibs = &pcib->boards[i]; - if (pcibs->board->bars[MAX_PCI_BARS].bget) { + if (pcibs->board && pcibs->board->bars[MAX_PCI_BARS].bget) { stored_board = i; stored_bar = MAX_PCI_BARS; *bar = stored_bar;