From 29c2d8090245ff1595663694833734cee9df8736 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sat, 22 Apr 2017 20:47:05 +0300 Subject: [PATCH] ncr may be null if accelerator with SCSI IO but no controller chip. --- ncr9x_scsi.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ncr9x_scsi.cpp b/ncr9x_scsi.cpp index da5b6284..ec656cc1 100644 --- a/ncr9x_scsi.cpp +++ b/ncr9x_scsi.cpp @@ -669,6 +669,9 @@ static void ncr9x_io_bput(struct ncr9x_state *ncr, uaecptr addr, uae_u32 val) int reg_shift = 2; uaecptr oldaddr = addr; + if (!ncr) + return; + addr &= ncr->board_mask; if (isncr(ncr, ncr_scram5394_scsi)) { @@ -1006,6 +1009,9 @@ static uae_u32 ncr9x_io_bget(struct ncr9x_state *ncr, uaecptr addr) int reg_shift = 2; uaecptr oldaddr = addr; + if (!ncr) + return v; + addr &= ncr->board_mask; if (isncr(ncr, ncr_scram5394_scsi)) { -- 2.47.3